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
170
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
76
Being an ethical software engineer
xgouchet
0
340
Libérez votre créativité
xgouchet
0
170
Unleash your Programming Creativity
xgouchet
0
230
Demystifying the Test Pyramid
xgouchet
1
740
Successfully Publishing a Tested, Upgradeable and Documented Open Source Library
xgouchet
0
150
Property Based Testing in Practice
xgouchet
0
130
Develop your CI tools
xgouchet
2
500
How to write a safe and reliable Open Source Library
xgouchet
1
360
Other Decks in Programming
See All in Programming
Prismを使った型安全な暗号化_関数型まつり2026
_fhhmm
0
140
AWS CDK を「作」ってみた 〜フルスクラッチで見えた CDK の裏側〜 / aws-cdk-from-scratch
gotok365
3
430
えっ!!コードを読まずに開発を!?
hananouchi
0
220
PHP初心者セッション2026 〜生成AIでは見えない裏側を知る:今だからLAMPを通して仕組みを学ぶ〜
kashioka
0
480
アルゴリズムは何を圧縮しているのか ─ Haskell から育った「圧縮代数」というメンタルモデル
naoya
16
3.5k
関数型プログラミングのメリットって何だろう?
wanko_it
0
180
SREの積み重ねがAI駆動開発のガードレールになった ― 7つの実践/SRE Guardrails The 7
tomoyakitaura
8
4.4k
1年で人数1.5倍、PR数5.5倍増。 品質とアウトカムはどうなったか、 何が効いたか
ike002jp
0
140
JAWS-UG横浜 #102 AWSサ終供養LT会 成仏できない AWS サービスたち 〜本日、三体供養します〜
maroon1st
0
210
5分で問診!Composer セキュリティ健康診断
codmoninc
0
280
コーディングルールの鮮度を保ちたい for SRE NEXT 2026 / keep-fresh-go-internal-conventions-sre-next-2026
handlename
0
140
SLOをサービス品質の共通言語にするために 取り組んできたこと
wakana0222
0
510
Featured
See All Featured
How to Ace a Technical Interview
jacobian
281
24k
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.4k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
220
Unsuck your backbone
ammeep
672
58k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.7k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
280
From π to Pie charts
rasagy
0
240
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
260
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
180
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
240
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
220
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