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
140
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
53
Being an ethical software engineer
xgouchet
PRO
0
320
Libérez votre créativité
xgouchet
PRO
0
140
Unleash your Programming Creativity
xgouchet
PRO
0
200
Demystifying the Test Pyramid
xgouchet
PRO
1
640
Successfully Publishing a Tested, Upgradeable and Documented Open Source Library
xgouchet
PRO
0
120
Property Based Testing in Practice
xgouchet
PRO
0
95
Develop your CI tools
xgouchet
PRO
2
450
How to write a safe and reliable Open Source Library
xgouchet
PRO
1
310
Other Decks in Programming
See All in Programming
高速開発のためのコード整理術
sutetotanuki
1
390
インターン生でもAuth0で認証基盤刷新が出来るのか
taku271
0
190
humanlayerのブログから学ぶ、良いCLAUDE.mdの書き方
tsukamoto1783
0
180
OCaml 5でモダンな並列プログラミングを Enjoyしよう!
haochenx
0
140
生成AIを使ったコードレビューで定性的に品質カバー
chiilog
1
250
SourceGeneratorのススメ
htkym
0
190
AgentCoreとHuman in the Loop
har1101
5
220
なぜSQLはAIぽく見えるのか/why does SQL look AI like
florets1
0
450
CSC307 Lecture 09
javiergs
PRO
1
830
AI & Enginnering
codelynx
0
110
Fragmented Architectures
denyspoltorak
0
150
MUSUBIXとは
nahisaho
0
130
Featured
See All Featured
Bash Introduction
62gerente
615
210k
Building Flexible Design Systems
yeseniaperezcruz
330
40k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
1
49
Leo the Paperboy
mayatellez
4
1.4k
The SEO Collaboration Effect
kristinabergwall1
0
350
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
110
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
640
What’s in a name? Adding method to the madness
productmarketing
PRO
24
3.9k
Between Models and Reality
mayunak
1
180
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
320
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
140
Unsuck your backbone
ammeep
671
58k
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