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
87
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
ComposeでWebアプリを作る技術
tbsten
0
130
파급효과: From AI to Android Development
l2hyunwoo
0
160
オープンソースコントリビュート入門
_katsuma
0
120
実践Webフロントパフォーマンスチューニング
cp20
45
10k
MySQL初心者が311個のカラムにNot NULL制約を追加していってALTER TABLEについて学んだ話
hatsu38
2
110
The Implementations of Advanced LR Parser Algorithm
junk0612
2
1.4k
GitHub Copilot for Azureを使い倒したい
ymd65536
1
330
エンジニア向けCursor勉強会 @ SmartHR
yukisnow1823
3
12k
By the way Google Cloud Next 2025に行ってみてどうだった
ymd65536
0
120
Contribute to Comunities | React Tokyo Meetup #4 LT
sasagar
0
600
Ruby で作る RISC-V CPU エミュレーター / RISC-V CPU emulator made with Ruby
hayaokimura
5
860
flutter_kaigi_mini_4.pdf
nobu74658
0
150
Featured
See All Featured
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
Designing for humans not robots
tammielis
253
25k
The Pragmatic Product Professional
lauravandoore
33
6.6k
A Tale of Four Properties
chriscoyier
159
23k
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
179
53k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
30
2k
Intergalactic Javascript Robots from Outer Space
tanoku
271
27k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.4k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
31
1.2k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
52
2.4k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
120
52k
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