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
31
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
560
Successfully Publishing a Tested, Upgradeable and Documented Open Source Library
xgouchet
PRO
0
110
Property Based Testing in Practice
xgouchet
PRO
0
84
Develop your CI tools
xgouchet
PRO
2
420
How to write a safe and reliable Open Source Library
xgouchet
PRO
1
280
Other Decks in Programming
See All in Programming
CSC305 Lecture 04
javiergs
PRO
0
260
タスクの特性や不確実性に応じた最適な作業スタイルの選択(ペアプロ・モブプロ・ソロプロ)と実践 / Optimal Work Style Selection: Pair, Mob, or Solo Programming.
honyanya
3
160
Cloudflare AgentsとAI SDKでAIエージェントを作ってみた
briete
0
130
Catch Up: Go Style Guide Update
andpad
0
210
uniqueパッケージの内部実装を支えるweak pointerの話
magavel
0
960
Advance Your Career with Open Source
ivargrimstad
0
460
NetworkXとGNNで学ぶグラフデータ分析入門〜複雑な関係性を解き明かすPythonの力〜
mhrtech
3
1.2k
オープンソースソフトウェアへの解像度🔬
utam0k
11
2.4k
バッチ処理を「状態の記録」から「事実の記録」へ
panda728
PRO
0
140
AI Coding Meetup #3 - 導入セッション / ai-coding-meetup-3
izumin5210
0
660
Pull-Requestの内容を1クリックで動作確認可能にするワークフロー
natmark
2
480
複雑化したリポジトリをなんとかした話 pipenvからuvによるモノレポ構成への移行
satoshi256kbyte
1
1k
Featured
See All Featured
Music & Morning Musume
bryan
46
6.8k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
For a Future-Friendly Web
brad_frost
180
9.9k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
19
1.2k
Principles of Awesome APIs and How to Build Them.
keavy
127
17k
Making Projects Easy
brettharned
119
6.4k
A Tale of Four Properties
chriscoyier
160
23k
Site-Speed That Sticks
csswizardry
11
890
GitHub's CSS Performance
jonrohan
1032
470k
Build The Right Thing And Hit Your Dates
maggiecrowley
37
2.9k
A designer walks into a library…
pauljervisheath
209
24k
Fireside Chat
paigeccino
40
3.7k
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