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 Gouchet
April 03, 2019
Programming
1
92
Compiler Based Testing
Xavier Gouchet
April 03, 2019
Tweet
Share
More Decks by Xavier Gouchet
See All by Xavier Gouchet
Libérez votre créativité
xgouchet
0
66
Unleash your Programming Creativity
xgouchet
0
110
Demystifying the Test Pyramid
xgouchet
1
360
Successfully Publishing a Tested, Upgradeable and Documented Open Source Library
xgouchet
0
62
Property Based Testing in Practice
xgouchet
0
55
Develop your CI tools
xgouchet
2
360
How to write a safe and reliable Open Source Library
xgouchet
1
230
Benchmarking your app's performance
xgouchet
0
180
Benchmarking your app's performance
xgouchet
0
85
Other Decks in Programming
See All in Programming
テストコード文化を0から作り、変化し続けた組織
kazatohiei
2
1.5k
バグを見つけた?それAppleに直してもらおう!
uetyo
0
180
テストコードのガイドライン 〜作成から運用まで〜
riku929hr
5
610
Mermaid x AST x 生成AI = コードとドキュメントの完全同期への道
shibuyamizuho
0
160
Spatial Rendering for Apple Vision Pro
warrenm
0
110
Effective Signals in Angular 19+: Rules and Helpers
manfredsteyer
PRO
0
110
今年一番支援させていただいたのは認証系サービスでした
satoshi256kbyte
1
260
menu基盤チームによるGoogle Cloudの活用事例~Application Integration, Cloud Tasks編~
yoshifumi_ishikura
0
110
競技プログラミングへのお誘い@阪大BOOSTセミナー
kotamanegi
0
360
rails stats で紐解く ANDPAD のイマを支える技術たち
andpad
1
290
Semantic Kernelのネイティブプラグインで知識拡張をしてみる
tomokusaba
0
180
Асинхронность неизбежна: как мы проектировали сервис уведомлений
lamodatech
0
800
Featured
See All Featured
Mobile First: as difficult as doing things right
swwweet
222
9k
How GitHub (no longer) Works
holman
311
140k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
665
120k
Facilitating Awesome Meetings
lara
50
6.1k
The Pragmatic Product Professional
lauravandoore
32
6.3k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.5k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
32
2.7k
Fireside Chat
paigeccino
34
3.1k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
The Invisible Side of Design
smashingmag
298
50k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
2
290
Producing Creativity
orderedlist
PRO
341
39k
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