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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
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
96
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
Grafana:建立系統全知視角的捷徑
blueswen
0
330
CSC307 Lecture 04
javiergs
PRO
0
660
ThorVG Viewer In VS Code
nors
0
770
Fluid Templating in TYPO3 14
s2b
0
130
QAフローを最適化し、品質水準を満たしながらリリースまでの期間を最短化する #RSGT2026
shibayu36
2
4.3k
なぜSQLはAIぽく見えるのか/why does SQL look AI like
florets1
0
450
Basic Architectures
denyspoltorak
0
660
AI によるインシデント初動調査の自動化を行う AI インシデントコマンダーを作った話
azukiazusa1
1
700
CSC307 Lecture 01
javiergs
PRO
0
690
AIと一緒にレガシーに向き合ってみた
nyafunta9858
0
180
OSSとなったswift-buildで Xcodeのビルドを差し替えられるため 自分でXcodeを直せる時代になっている ダイアモンド問題編
yimajo
3
610
組織で育むオブザーバビリティ
ryota_hnk
0
170
Featured
See All Featured
Rails Girls Zürich Keynote
gr2m
96
14k
A Tale of Four Properties
chriscoyier
162
24k
Writing Fast Ruby
sferik
630
62k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
How To Stay Up To Date on Web Technology
chriscoyier
791
250k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.4k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
0
2.3k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
72
Exploring anti-patterns in Rails
aemeredith
2
250
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
110
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
88
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