aboutsummaryrefslogtreecommitdiffstats
path: root/.gitignore
Commit message (Expand)AuthorAgeFilesLines
* Update readme and default layout for TADA68James Barrett2017-03-111-0/+1
* added dvorak programmer layoutlucwastiaux2016-10-221-1/+2
* Added VS Code dir to .gitignoreJoshua T2016-10-151-0/+1
* Marked the Win_Check_Output.txt file as ignoredIBNobody2016-09-141-0/+1
* Added S60-X to keyboards with two layouts.Felix Uhl2016-08-111-0/+1
* Generate version information to version.hFred Sundvik2016-07-311-1/+2
* Update .gitignore to include VSCode setting.Will Wolff-Myren2016-07-171-0/+1
* Backlight abstraction and other changes (#439)Jack Humbert2016-06-231-5/+3
* Renames keyboard folder to keyboards, adds couple of tmk's fixes (#432)Jack Humbert2016-06-211-4/+4
* Makefile redo & other features (#395)Jack Humbert2016-06-111-1/+5
* Stops explorer.exe from being started with admin privilieges (#373)Noah Andrews2016-06-021-0/+3
* Adding clueboard/cluepad support to qmkskullY2016-03-271-2/+2
* ignore dfu-programme.exe in commitsLucas Hecht2016-02-261-1/+3
* Added eclipse settings files to .gitignoreDidier Loiseau2016-02-211-1/+6
* my personal ergodox keymap layoutDaniel Mijares2016-02-061-0/+1
* Merge pull request #73 from dragon788/dragon_modErez Zukerman2016-01-181-0/+1
|\
| * Adding Vagrantfile for easier compile environment setupdragon7882016-01-031-0/+1
* | Dave's custom keymapDave Jones2016-01-021-0/+1
|/
* Merge branch 'rn42' into merge_rn42tmk2014-11-241-0/+2
|\
| * Fix build files for mbedtmk2014-07-301-0/+2
* | ignore files with trailing ~Simon Stapleton2014-11-141-0/+1
|/
* add mouse function.tmk2010-09-301-0/+1
* change file name.tmk2010-08-101-0/+9
274' href='#n274'>274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447
(**Note:** If you get compiler errors that you don't understand, be sure to consult [Google Mock Doctor](FrequentlyAskedQuestions.md#how-am-i-supposed-to-make-sense-of-these-horrible-template-errors).)

# What Is Google C++ Mocking Framework? #
When you write a prototype or test, often it's not feasible or wise to rely on real objects entirely. A **mock object** implements the same interface as a real object (so it can be used as one), but lets you specify at run time how it will be used and what it should do (which methods will be called? in which order? how many times? with what arguments? what will they return? etc).

**Note:** It is easy to confuse the term _fake objects_ with mock objects. Fakes and mocks actually mean very different things in the Test-Driven Development (TDD) community:

  * **Fake** objects have working implementations, but usually take some shortcut (perhaps to make the operations less expensive), which makes them not suitable for production. An in-memory file system would be an example of a fake.
  * **Mocks** are objects pre-programmed with _expectations_, which form a specification of the calls they are expected to receive.

If all this seems too abstract for you, don't worry - the most important thing to remember is that a mock allows you to check the _interaction_ between itself and code that uses it. The difference between fakes and mocks will become much clearer once you start to use mocks.

**Google C++ Mocking Framework** (or **Google Mock** for short) is a library (sometimes we also call it a "framework" to make it sound cool) for creating mock classes and using them. It does to C++ what [jMock](http://www.jmock.org/) and [EasyMock](http://www.easymock.org/) do to Java.

Using Google Mock involves three basic steps:

  1. Use some simple macros to describe the interface you want to mock, and they will expand to the implementation of your mock class;
  1. Create some mock objects and specify its expectations and behavior using an intuitive syntax;
  1. Exercise code that uses the mock objects. Google Mock will catch any violation of the expectations as soon as it arises.

# Why Google Mock? #
While mock objects help you remove unnecessary dependencies in tests and make them fast and reliable, using mocks manually in C++ is _hard_:

  * Someone has to implement the mocks. The job is usually tedious and error-prone. No wonder people go great distances to avoid it.