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
120
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
250
Libérez votre créativité
xgouchet
PRO
0
110
Unleash your Programming Creativity
xgouchet
PRO
0
170
Demystifying the Test Pyramid
xgouchet
PRO
1
490
Successfully Publishing a Tested, Upgradeable and Documented Open Source Library
xgouchet
PRO
0
100
Property Based Testing in Practice
xgouchet
PRO
0
82
Develop your CI tools
xgouchet
PRO
2
400
How to write a safe and reliable Open Source Library
xgouchet
PRO
1
270
Benchmarking your app's performance
xgouchet
PRO
0
220
Other Decks in Programming
See All in Programming
GoのGenericsによるslice操作との付き合い方
syumai
3
700
Code as Context 〜 1にコードで 2にリンタ 34がなくて 5にルール? 〜
yodakeisuke
0
120
“いい感じ“な定量評価を求めて - Four Keysとアウトカムの間の探求 -
nealle
0
260
deno-redisの紹介とJSRパッケージの運用について (toranoana.deno #21)
uki00a
0
160
プロダクト志向ってなんなんだろうね
righttouch
PRO
0
170
AIコーディング道場勉強会#2 君(エンジニア)たちはどう生きるか
misakiotb
1
270
Hypervel - A Coroutine Framework for Laravel Artisans
albertcht
1
110
Java on Azure で LangGraph!
kohei3110
0
170
WebViewの現在地 - SwiftUI時代のWebKit - / The Current State Of WebView
marcy731
0
100
Cline指示通りに動かない? AI小説エージェントで学ぶ指示書の書き方と自動アップデートの仕組み
kamomeashizawa
1
600
童醫院敏捷轉型的實踐經驗
cclai999
0
210
DroidKnights 2025 - 다양한 스크롤 뷰에서의 영상 재생
gaeun5744
3
340
Featured
See All Featured
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
46
9.6k
Writing Fast Ruby
sferik
628
62k
4 Signs Your Business is Dying
shpigford
184
22k
jQuery: Nuts, Bolts and Bling
dougneiner
63
7.8k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.7k
Testing 201, or: Great Expectations
jmmastey
42
7.6k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
357
30k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
107
19k
[RailsConf 2023] Rails as a piece of cake
palkan
55
5.6k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
The World Runs on Bad Software
bkeepers
PRO
69
11k
Faster Mobile Websites
deanohume
307
31k
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