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
81
Being an ethical software engineer
xgouchet
0
350
Libérez votre créativité
xgouchet
0
180
Unleash your Programming Creativity
xgouchet
0
230
Demystifying the Test Pyramid
xgouchet
1
760
Successfully Publishing a Tested, Upgradeable and Documented Open Source Library
xgouchet
0
150
Property Based Testing in Practice
xgouchet
0
140
Develop your CI tools
xgouchet
2
510
How to write a safe and reliable Open Source Library
xgouchet
1
360
Other Decks in Programming
See All in Programming
「人を評価する AI」の設計と実装
ryoyanara
0
260
わからない話を追いかけたら、プログラミング言語を作る側にいた
ydah
3
560
Detecting Compromised CI with eBPF and Cilium Tetragon
lizrice
0
270
in-process GraphQL のすすめ #ginzajs
izumin5210
4
1.5k
Oxlintはいいぞ(続)
yug1224
1
480
komatsuna「分散システムにおけるバグ分析手法」
komatsunaqa
0
280
進化を続けるGo toolsの現在地 / The Current State of Ever-Evolving Go Tools
hond0413
0
270
「寝てても仕事が進む」Claude Codeで組む第二の脳
tomoyafujita2016
0
370
Dockerfile CMD for Node.js
grazie1999
0
140
Introducing Stack Pull Request in GitHub
kkamegawa
0
110
仕様駆動開発へのトライを機に チームに適合する手法を模索し続けている話
freee
PRO
0
650
自動化したのに回らない テスト運用の壁―AI時代の品質責任と生産性
mfunaki
0
530
Featured
See All Featured
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.4k
Navigating Weather and Climate Data
rabernat
0
490
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
6
1.2k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
How to make the Groovebox
asonas
2
2.4k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.5k
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
210
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
290
Automating Front-end Workflow
addyosmani
1369
210k
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
450
Optimising Largest Contentful Paint
csswizardry
37
3.9k
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