Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Compiler Based Testing
Search
Xavier F. Gouchet
PRO
April 03, 2019
Programming
0
130
Compiler Based Testing
Xavier F. Gouchet
PRO
April 03, 2019
Tweet
Share
More Decks by Xavier F. Gouchet
See All by Xavier F. Gouchet
Writing a Kotlin Compiler Plugin
xgouchet
PRO
0
37
Being an ethical software engineer
xgouchet
PRO
0
290
Libérez votre créativité
xgouchet
PRO
0
120
Unleash your Programming Creativity
xgouchet
PRO
0
180
Demystifying the Test Pyramid
xgouchet
PRO
1
570
Successfully Publishing a Tested, Upgradeable and Documented Open Source Library
xgouchet
PRO
0
110
Property Based Testing in Practice
xgouchet
PRO
0
86
Develop your CI tools
xgouchet
PRO
2
430
How to write a safe and reliable Open Source Library
xgouchet
PRO
1
290
Other Decks in Programming
See All in Programming
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
420
Pythonに漸進的に型をつける
nealle
1
140
ボトムアップの生成AI活用を推進する社内AIエージェント開発
aku11i
0
1.3k
20251016_Rails News ~Rails 8.1の足音を聴く~
morimorihoge
3
890
One Enishi After Another
snoozer05
PRO
0
170
GC25 Recap: The Code You Reviewed is Not the Code You Built / #newt_gophercon_tour
mazrean
0
130
Designing Repeatable Edits: The Architecture of . in Vim
satorunooshie
0
190
品質ワークショップをやってみた
nealle
0
660
バッチ処理を「状態の記録」から「事実の記録」へ
panda728
PRO
0
210
マイベストのシンプルなデータ基盤の話 - Googleスイートとのつき合い方 / mybest-simple-data-architecture-google-nized
snhryt
0
110
CSC305 Lecture 10
javiergs
PRO
0
320
TFLintカスタムプラグインで始める Terraformコード品質管理
bells17
2
500
Featured
See All Featured
The Cost Of JavaScript in 2023
addyosmani
55
9.1k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3k
Building Flexible Design Systems
yeseniaperezcruz
329
39k
4 Signs Your Business is Dying
shpigford
186
22k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
1.7k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
132
19k
Site-Speed That Sticks
csswizardry
13
940
Mobile First: as difficult as doing things right
swwweet
225
10k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
127
54k
YesSQL, Process and Tooling at Scale
rocio
174
15k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
15k
Reflections from 52 weeks, 52 projects
jeffersonlam
355
21k
Transcript
@xgouchet Compiler based Testing CodeMobile UK 2019 - Chester
@xgouchet About me… Xavier F. Gouchet Android developer since the
Cupcake years Lead Android Engineer at WorkWell @xgouchet on every social network you can think of… 2
@xgouchet Testing is Hard Let’s let the compiler do most
of the hard work for us 3
@xgouchet Kotlin / Swift ▧ Statically Typed ▧ Strong Typed
▧ Type Safe ▧ Type Inference 4
@xgouchet Basic use case — JSON { "id" : 481516,
"title" : "Lorem ipsum dolor sit amet…", "picture" : "https://cloudhost.com/5162342", "created": 1553631328 } 5
@xgouchet Basic use case — App Model data class Event(
val id: Int, val title: String, val picture: String, val created: Int } 6
@xgouchet Primitive Aversion Primitives are lightweight… but lack context 7
@xgouchet Use existing types ▧ Integrated in framework and libraries
▧ Zero additional work data class Event( … val created: Date } 8
@xgouchet Type Alias ▧ Give context ▧ Prevent invalid assignements
▧ Ease Maintenance typealias Id = Int data class Event( val id: Id, … } 9
@xgouchet Type Checking ▧ Limit Primitive Scope ▧ Validate data
data class Url(val value: String) { init { val parsedUrl = URL(value) } } data class Event( … val picture: Url } 10
@xgouchet Additional gains 11
@xgouchet Bonus ▧ Share common operations ▧ Force explicit types
▧ Simplify complex structure 12
@xgouchet @xgouchet Thanks! Any questions? 13 Presentation template by SlidesCarnival