$30 off During Our Annual Pro Sale. View Details »
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
43
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
590
Successfully Publishing a Tested, Upgradeable and Documented Open Source Library
xgouchet
PRO
0
120
Property Based Testing in Practice
xgouchet
PRO
0
89
Develop your CI tools
xgouchet
PRO
2
440
How to write a safe and reliable Open Source Library
xgouchet
PRO
1
300
Other Decks in Programming
See All in Programming
テストやOSS開発に役立つSetup PHP Action
matsuo_atsushi
0
140
All(?) About Point Sets
hole
0
260
tsgolintはいかにしてtypescript-goの非公開APIを呼び出しているのか
syumai
5
1.1k
20 years of Symfony, what's next?
fabpot
2
310
【CA.ai #3】Google ADKを活用したAI Agent開発と運用知見
harappa80
0
260
AIと協働し、イベントソーシングとアクターモデルで作る後悔しないアーキテクチャ Regret-Free Architecture with AI, Event Sourcing, and Actors
tomohisa
5
18k
AI時代もSEOを頑張っている話
shirahama_x
0
230
Building AI Agents with TypeScript #TSKaigiHokuriku
izumin5210
6
1.2k
ZOZOにおけるAI活用の現在 ~モバイルアプリ開発でのAI活用状況と事例~
zozotech
PRO
8
4.1k
スタートアップを支える技術戦略と組織づくり
pospome
8
15k
CSC305 Lecture 15
javiergs
PRO
0
240
CSC509 Lecture 14
javiergs
PRO
0
220
Featured
See All Featured
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.1k
Art, The Web, and Tiny UX
lynnandtonic
303
21k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
253
22k
Rails Girls Zürich Keynote
gr2m
95
14k
Stop Working from a Prison Cell
hatefulcrawdad
273
21k
Product Roadmaps are Hard
iamctodd
PRO
55
12k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
9
1k
Learning to Love Humans: Emotional Interface Design
aarron
274
41k
Optimising Largest Contentful Paint
csswizardry
37
3.5k
Bash Introduction
62gerente
615
210k
VelocityConf: Rendering Performance Case Studies
addyosmani
333
24k
Git: the NoSQL Database
bkeepers
PRO
432
66k
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