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
110
Compiler Based Testing
Xavier F. Gouchet
PRO
April 03, 2019
Tweet
Share
More Decks by Xavier F. Gouchet
See All by Xavier F. Gouchet
Being an ethical software engineer
xgouchet
PRO
0
230
Libérez votre créativité
xgouchet
PRO
0
97
Unleash your Programming Creativity
xgouchet
PRO
0
150
Demystifying the Test Pyramid
xgouchet
PRO
1
460
Successfully Publishing a Tested, Upgradeable and Documented Open Source Library
xgouchet
PRO
0
86
Property Based Testing in Practice
xgouchet
PRO
0
65
Develop your CI tools
xgouchet
PRO
2
390
How to write a safe and reliable Open Source Library
xgouchet
PRO
1
260
Benchmarking your app's performance
xgouchet
PRO
0
210
Other Decks in Programming
See All in Programming
Creating Awesome Change in SmartNews! En
martin_lover
0
110
파급효과: From AI to Android Development
l2hyunwoo
0
160
Bedrock × Confluenceで簡単(?)社内RAG
iharuoru
1
110
API for docs
soutaro
3
1.6k
Cursor/Devin全社導入の理想と現実
saitoryc
28
21k
KawaiiLT 登壇資料 キャリアとモチベーション
hiiragi
0
160
[NG India] Event-Based State Management with NgRx SignalStore
markostanimirovic
1
190
eBPF超入門「o11yに使える」とは (20250424_eBPF_o11y)
thousanda
1
110
The Evolution of the CRuby Build System
kateinoigakukun
1
760
iOSアプリで測る!名古屋駅までの 方向と距離
ryunakayama
0
140
AI時代の開発者評価について
ayumuu
0
230
On-the-fly Suggestions of Rewriting Method Deprecations
ohbarye
1
4.7k
Featured
See All Featured
Build your cross-platform service in a week with App Engine
jlugia
230
18k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
The Language of Interfaces
destraynor
157
25k
Building a Scalable Design System with Sketch
lauravandoore
462
33k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
10
780
StorybookのUI Testing Handbookを読んだ
zakiyama
29
5.7k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
Facilitating Awesome Meetings
lara
54
6.3k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
8
690
Side Projects
sachag
453
42k
A Tale of Four Properties
chriscoyier
158
23k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
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