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
87
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
61
Unleash your Programming Creativity
xgouchet
0
95
Demystifying the Test Pyramid
xgouchet
1
330
Successfully Publishing a Tested, Upgradeable and Documented Open Source Library
xgouchet
0
58
Property Based Testing in Practice
xgouchet
0
49
Develop your CI tools
xgouchet
2
360
How to write a safe and reliable Open Source Library
xgouchet
1
230
Benchmarking your app's performance
xgouchet
0
170
Benchmarking your app's performance
xgouchet
0
81
Other Decks in Programming
See All in Programming
Universal Linksの実装方法と陥りがちな罠
kaitokudou
1
220
飲食業界向けマルチプロダクトを実現させる開発体制とリアルな現状
hiroya0601
1
400
外部システム連携先が10を超えるシステムでのアーキテクチャ設計・実装事例
kiwasaki
1
230
Modern Angular: Renovation for Your Applications
manfredsteyer
PRO
0
210
Tuning GraphQL on Rails
pyama86
2
1k
推し活としてのrails new/oshikatsu_ha_iizo
sakahukamaki
3
1.7k
LLM生成文章の精度評価自動化とプロンプトチューニングの効率化について
layerx
PRO
2
140
破壊せよ!データ破壊駆動で考えるドメインモデリング / data-destroy-driven
minodriven
16
4.1k
Pinia Colada が実現するスマートな非同期処理
naokihaba
2
160
Importmapを使ったJavaScriptの 読み込みとブラウザアドオンの影響
swamp09
4
1.2k
ECSのサービス間通信 4つの方法を比較する 〜Canary,Blue/Greenも添えて〜
tkikuc
11
2.3k
GCCのプラグインを作る / I Made a GCC Plugin
shouth
1
150
Featured
See All Featured
Designing Dashboards & Data Visualisations in Web Apps
destraynor
228
52k
A designer walks into a library…
pauljervisheath
202
24k
What's new in Ruby 2.0
geeforr
342
31k
Ruby is Unlike a Banana
tanoku
96
11k
KATA
mclloyd
29
13k
Writing Fast Ruby
sferik
626
61k
The Cult of Friendly URLs
andyhume
78
6k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
246
1.3M
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
159
15k
Optimizing for Happiness
mojombo
376
69k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
364
22k
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