|
67 | 67 | * How And When? |
68 | 68 | * Frameworks |
69 | 69 | * Mocking |
70 | | - * Writing A Testable Code (Unit Testing) |
| 70 | + * Writing A Testable Code |
71 | 71 | * Single Responsibility Principle |
72 | 72 | * Dependency Injection |
73 | | - * Automatic Mocks Injection |
74 | | - * Test Driven Development |
| 73 | + * Automatic Mocks Injection |
| 74 | + * Test Driven Development |
75 | 75 | * Showcase (User Story -> ... -> Commit) |
76 | 76 | * C++2X... |
77 | 77 |
|
|
207 | 207 |
|
208 | 208 | #### <p align="left">GUnit.GTest-Lite (it will be used on the slides)</p> |
209 | 209 | ```cpp |
210 | | -"should add 2 numbers"_test = [] { |
211 | | - EXPECT(4 == add(2, 2)); |
| 210 | +"should add 2 numbers"_test = [] { // -gnu-string-literal- |
| 211 | + EXPECT(4 == add(2, 2)); // -operator-template |
212 | 212 | }; |
213 | 213 | ``` |
214 | 214 |
|
|
228 | 228 | ####good* |
229 | 229 | * Easy to do to simple things but with possibility to do more complex too |
230 | 230 | * Limited boilerplate (especially macros) |
231 | | -* Mocking Interfaces/Concepts/Type-Erasure |
| 231 | +* Mocking Interfaces/Templates/Concepts/Type-Erasure |
232 | 232 |
|
233 | 233 | ---- |
234 | 234 |
|
|
427 | 427 | | | | |
428 | 428 | |-|-| |
429 | 429 | | GoogleMock | https://github.com/google/googletest | |
430 | | -| GUnit.GMock | https://github.com/cpp-testing/GUnit#GMock | |
431 | 430 | | Dyno (Type-Erasure) | https://github.com/ldionne/dyno | |
432 | | - |
| 431 | +| GUnit.GMock | https://github.com/cpp-testing/GUnit#GMock | |
| 432 | +<!-- .element: style="margin-left:-13%; width:125%" --> |
| 433 | + * Features |
| 434 | + * No more hand written mocks! |
| 435 | + * Support for more than 10 parameters |
| 436 | + * Support for std::unique_ptr without any tricks |
| 437 | + * Support for overloaded operators |
| 438 | + * Support for mocking classes with constructors |
| 439 | + * 100% Compatible with Google Mocks |
| 440 | + * Quicker compilation times |
433 | 441 | ============================================================================== |
434 | 442 |
|
435 | 443 | ### Consider writing `SOLID` instead of `STUPID` code |
|
759 | 767 | any<Loggable> logger; // `virtual Readable` with virtual concepts! |
760 | 768 |
|
761 | 769 | public: |
762 | | - App(any<Readable> reader, any<Printable> printer, any<Loggable> logger) |
763 | | - : reader(reader), printer(printer) |
| 770 | + App(any<Readable> reader |
| 771 | + , any<Printable> printer |
| 772 | + , any<Loggable> logger) |
| 773 | + : reader(reader), printer(printer), logger(logger) |
764 | 774 | { } |
765 | 775 |
|
766 | 776 | void run() { |
|
0 commit comments