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 Gouchet
April 03, 2019
Programming
1
100
Compiler Based Testing
Xavier Gouchet
April 03, 2019
Tweet
Share
More Decks by Xavier Gouchet
See All by Xavier Gouchet
Libérez votre créativité
xgouchet
0
81
Unleash your Programming Creativity
xgouchet
0
120
Demystifying the Test Pyramid
xgouchet
1
410
Successfully Publishing a Tested, Upgradeable and Documented Open Source Library
xgouchet
0
73
Property Based Testing in Practice
xgouchet
0
57
Develop your CI tools
xgouchet
2
380
How to write a safe and reliable Open Source Library
xgouchet
1
240
Benchmarking your app's performance
xgouchet
0
190
Benchmarking your app's performance
xgouchet
0
92
Other Decks in Programming
See All in Programming
CloudNativePGを布教したい
nnaka2992
0
120
自力でTTSモデルを作った話
zgock999
0
110
PEPCは何を変えようとしていたのか
ken7253
3
290
AIプログラミング雑キャッチアップ
yuheinakasaka
19
4.9k
新宿駅構内を三人称視点で探索してみる
satoshi7190
2
120
複数のAWSアカウントから横断で 利用する Lambda Authorizer の作り方
tc3jp
0
120
color-scheme: light dark; を完全に理解する
uhyo
7
500
責務と認知負荷を整える! 抽象レベルを意識した関心の分離
yahiru
8
1.5k
なぜイベント駆動が必要なのか - CQRS/ESで解く複雑系システムの課題 -
j5ik2o
14
4.7k
Rubyで始める関数型ドメインモデリング
shogo_tksk
0
140
コードを読んで理解するko build
bells17
1
110
仕様変更に耐えるための"今の"DRY原則を考える
mkmk884
9
3.2k
Featured
See All Featured
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
A designer walks into a library…
pauljervisheath
205
24k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
4
440
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
7.1k
Music & Morning Musume
bryan
46
6.4k
Facilitating Awesome Meetings
lara
53
6.2k
Designing on Purpose - Digital PM Summit 2013
jponch
117
7.1k
Designing Experiences People Love
moore
140
23k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
29
1k
GraphQLの誤解/rethinking-graphql
sonatard
69
10k
Six Lessons from altMBA
skipperchong
27
3.6k
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