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
April 03, 2019
Programming
160
0
Share
Compiler Based Testing
Xavier F. Gouchet
April 03, 2019
More Decks by Xavier F. Gouchet
See All by Xavier F. Gouchet
Writing a Kotlin Compiler Plugin
xgouchet
0
67
Being an ethical software engineer
xgouchet
0
330
Libérez votre créativité
xgouchet
0
150
Unleash your Programming Creativity
xgouchet
0
220
Demystifying the Test Pyramid
xgouchet
1
690
Successfully Publishing a Tested, Upgradeable and Documented Open Source Library
xgouchet
0
140
Property Based Testing in Practice
xgouchet
0
110
Develop your CI tools
xgouchet
2
480
How to write a safe and reliable Open Source Library
xgouchet
1
330
Other Decks in Programming
See All in Programming
Agentic Elixir
whatyouhide
0
420
(Re)make Regexp in Ruby: Democratizing internals for the JIT
makenowjust
3
890
PCOVから学ぶコードカバレッジ #phpcon_odawara
o0h
PRO
0
280
Oxlintとeslint-plugin-react-hooks 明日から始められそう?
t6adev
0
300
GNU Makeの使い方 / How to use GNU Make
kaityo256
PRO
16
5.6k
「話せることがない」を乗り越える 〜日常業務から登壇テーマをつくる思考法〜
shoheimitani
4
910
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
270
クラウドネイティブなエンジニアに向ける Raycastの魅力と実際の活用事例
nealle
2
230
2026_04_15_量子計算をパズルとして解く
hideakitakechi
0
130
PHP で mp3 プレイヤーを実装しよう
m3m0r7
PRO
0
290
🦞OpenClaw works with AWS
licux
1
310
How We Benchmarked Quarkus: Patterns and anti-patterns
hollycummins
1
160
Featured
See All Featured
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
130
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
62
53k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
2.8k
Statistics for Hackers
jakevdp
799
230k
Code Reviewing Like a Champion
maltzj
528
40k
Darren the Foodie - Storyboard
khoart
PRO
3
3.3k
Building the Perfect Custom Keyboard
takai
2
740
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
270
Large-scale JavaScript Application Architecture
addyosmani
515
110k
Technical Leadership for Architectural Decision Making
baasie
3
340
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.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