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
70
Being an ethical software engineer
xgouchet
0
340
Libérez votre créativité
xgouchet
0
160
Unleash your Programming Creativity
xgouchet
0
220
Demystifying the Test Pyramid
xgouchet
1
710
Successfully Publishing a Tested, Upgradeable and Documented Open Source Library
xgouchet
0
140
Property Based Testing in Practice
xgouchet
0
120
Develop your CI tools
xgouchet
2
490
How to write a safe and reliable Open Source Library
xgouchet
1
340
Other Decks in Programming
See All in Programming
ユニットテストの先へ:テスト技法で要求・仕様を整理するJava開発実践 / Beyond_Unit_Testing_Practical_Java_Development_Techniques_for_Organizing_Requirements_and_Specifications
shimashima35
0
340
TSKaigi 2026 TypeScriptバックエンドのオブザーバビリティ戦略 — Datadog × NestJSの実践
taiseiyamamotoan
2
270
運用エージェントは "作る" から "育てる" へ - 記憶と自己進化の3層設計パターン / self-evolving-agents-three-layer-agent-design
gawa
12
3.4k
Swiftのレキシカルスコープ管理
kntkymt
0
210
jQueryをバージョンアップする前に使いたいjQuery Migrate
matsuo_atsushi
0
170
エージェンティックRAGにAWSで入門しよう!
har1101
5
110
AIとASP.NET Coreで雑Webアプリを作った話
mayuki
0
150
OCRを使ってゲームのアイテムをデータ化する
kishikawakatsumi
0
130
AI駆動開発勉強会 広島支部 第一回勉強会 AI駆動開発概要とワークショップ
hayatoshimiu
0
430
さぁV100、メモリをお食べ・・・
nilpe
0
130
The NotImplementedError Problem in Ruby
koic
0
320
肥大化するレガシーコードに立ち向かうためのインターフェース分離と依存の逆転 / JJUG CCC 2026 Spring
hirokunimaeta
0
470
Featured
See All Featured
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
190
Building an army of robots
kneath
306
46k
Building Adaptive Systems
keathley
44
3k
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
118
120k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
160
The SEO Collaboration Effect
kristinabergwall1
1
470
The Language of Interfaces
destraynor
162
27k
HDC tutorial
michielstock
2
690
4 Signs Your Business is Dying
shpigford
187
22k
Tell your own story through comics
letsgokoyo
1
940
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.6k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
3.3k
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