rc::check("addition is commutative",
[](int a, int b) {
RC_ASSERT(a + b == b + a);
});
```
> ๐ Frameworks auto-generate random inputs โ let the fuzzer find edge cases!
---
### ๐งช Test Strategies Comparison
.mermaid[
graph TD
A["๐งช Test Strategies"] --> B["๐ Round-trip"]
A --> C["๐ Property-based"]
B --> B1["Encode/Decode"]
B --> B2["Transform/Inverse"]
B --> B3["Add/Subtract"]
C --> C1["Algebraic Laws"]
C --> C2["Geometric Invariants"]
C --> C3["Graph Constraints"]
style A fill:#fff9c4,stroke:#f57f17,color:#2e3440,stroke-width:3px
style B fill:#e3f2fd,stroke:#1565c0,color:#2e3440,stroke-width:3px
style C fill:#c8e6c9,stroke:#2e7d32,color:#2e3440,stroke-width:3px
style B1 fill:#e3f2fd,stroke:#1565c0,color:#2e3440,stroke-width:3px
style B2 fill:#e3f2fd,stroke:#1565c0,color:#2e3440,stroke-width:3px
style B3 fill:#e3f2fd,stroke:#1565c0,color:#2e3440,stroke-width:3px
style C1 fill:#c8e6c9,stroke:#2e7d32,color:#2e3440,stroke-width:3px
style C2 fill:#c8e6c9,stroke:#2e7d32,color:#2e3440,stroke-width:3px
style C3 fill:#c8e6c9,stroke:#2e7d32,color:#2e3440,stroke-width:3px
]
---
### ๐ฏ Putting It All Together
.mermaid[
graph LR
A["๐ค AI Code"] --> B["๐ Review"]
B --> C["๐งช Write Tests"]
C --> D["๐ Round-trip"]
C --> E["๐ Properties"]
D --> F{"โ
Pass?"}
E --> F
F -- "Yes โ
" --> G["โ
Accept"]
F -- "No โ" --> H["๐ง Fix"]
H --> A
style A fill:#e3f2fd,stroke:#1565c0,color:#2e3440,stroke-width:3px
style B fill:#e8eaf6,stroke:#283593,color:#2e3440,stroke-width:3px
style C fill:#fff9c4,stroke:#f57f17,color:#2e3440,stroke-width:3px
style D fill:#c8e6c9,stroke:#2e7d32,color:#2e3440,stroke-width:3px
style E fill:#c8e6c9,stroke:#2e7d32,color:#2e3440,stroke-width:3px
style F fill:#ffe0b2,stroke:#e65100,color:#2e3440,stroke-width:3px
style G fill:#c8e6c9,stroke:#2e7d32,color:#2e3440,stroke-width:3px
style H fill:#ffcdd2,stroke:#c62828,color:#2e3440,stroke-width:3px
]
.center[
> ๐ก๏ธ Not 100% guarantee โ but useful for AI.
]
---
count: false
class: nord-dark, middle, center
# Questions? ๐ฌ