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
PRO
April 03, 2019
Programming
0
140
Compiler Based Testing
Xavier F. Gouchet
PRO
April 03, 2019
Tweet
Share
More Decks by Xavier F. Gouchet
See All by Xavier F. Gouchet
Writing a Kotlin Compiler Plugin
xgouchet
PRO
0
51
Being an ethical software engineer
xgouchet
PRO
0
310
Libérez votre créativité
xgouchet
PRO
0
130
Unleash your Programming Creativity
xgouchet
PRO
0
200
Demystifying the Test Pyramid
xgouchet
PRO
1
630
Successfully Publishing a Tested, Upgradeable and Documented Open Source Library
xgouchet
PRO
0
120
Property Based Testing in Practice
xgouchet
PRO
0
95
Develop your CI tools
xgouchet
PRO
2
450
How to write a safe and reliable Open Source Library
xgouchet
PRO
1
310
Other Decks in Programming
See All in Programming
GISエンジニアから見たLINKSデータ
nokonoko1203
0
190
Architectural Extensions
denyspoltorak
0
250
dchart: charts from deck markup
ajstarks
3
970
副作用をどこに置くか問題:オブジェクト指向で整理する設計判断ツリー
koxya
1
560
ELYZA_Findy AI Engineering Summit登壇資料_AIコーディング時代に「ちゃんと」やること_toB LLMプロダクト開発舞台裏_20251216
elyza
2
1.3k
Denoのセキュリティに関する仕組みの紹介 (toranoana.deno #23)
uki00a
0
260
Automatic Grammar Agreementと Markdown Extended Attributes について
kishikawakatsumi
0
170
カスタマーサクセス業務を変革したヘルススコアの実現と学び
_hummer0724
0
420
Vibe codingでおすすめの言語と開発手法
uyuki234
0
200
ThorVG Viewer In VS Code
nors
0
750
コマンドとリード間の連携に対する脅威分析フレームワーク
pandayumi
1
420
IFSによる形状設計/デモシーンの魅力 @ 慶應大学SFC
gam0022
1
270
Featured
See All Featured
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
0
190
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
0
1.1k
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
200
The agentic SEO stack - context over prompts
schlessera
0
600
What’s in a name? Adding method to the madness
productmarketing
PRO
24
3.9k
The Spectacular Lies of Maps
axbom
PRO
1
460
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.2k
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
55
49k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
300
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
1
1.3k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
130
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