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
46
Being an ethical software engineer
xgouchet
PRO
0
310
Libérez votre créativité
xgouchet
PRO
0
130
Unleash your Programming Creativity
xgouchet
PRO
0
190
Demystifying the Test Pyramid
xgouchet
PRO
1
610
Successfully Publishing a Tested, Upgradeable and Documented Open Source Library
xgouchet
PRO
0
120
Property Based Testing in Practice
xgouchet
PRO
0
91
Develop your CI tools
xgouchet
PRO
2
450
How to write a safe and reliable Open Source Library
xgouchet
PRO
1
300
Other Decks in Programming
See All in Programming
PostgreSQLで手軽にDuckDBを使う!DuckDB&pg_duckdb入門/osc25hi-duckdb
takahashiikki
0
200
ZJIT: The Ruby 4 JIT Compiler / Ruby Release 30th Anniversary Party
k0kubun
1
290
SwiftUIで本格音ゲー実装してみた
hypebeans
0
510
モデル駆動設計をやってみようワークショップ開催報告(Modeling Forum2025) / model driven design workshop report
haru860
0
290
The Art of Re-Architecture - Droidcon India 2025
siddroid
0
140
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
430
Navigation 3: 적응형 UI를 위한 앱 탐색
fornewid
1
490
tsgolintはいかにしてtypescript-goの非公開APIを呼び出しているのか
syumai
7
2.4k
実は歴史的なアップデートだと思う AWS Interconnect - multicloud
maroon1st
0
270
Grafana:建立系統全知視角的捷徑
blueswen
0
250
公共交通オープンデータ × モバイルUX 複雑な運行情報を 『直感』に変換する技術
tinykitten
PRO
0
170
AI時代を生き抜く 新卒エンジニアの生きる道
coconala_engineer
1
450
Featured
See All Featured
Unsuck your backbone
ammeep
671
58k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
38
Mind Mapping
helmedeiros
PRO
0
41
The Art of Programming - Codeland 2020
erikaheidi
56
14k
Writing Fast Ruby
sferik
630
62k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
286
14k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
1.4k
Heart Work Chapter 1 - Part 1
lfama
PRO
3
35k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.8k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.3k
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
1
410
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
55k
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