Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/joakimkarlsson/igloo
A framework for unit testing in C++
https://github.com/joakimkarlsson/igloo
Last synced: 18 days ago
JSON representation
A framework for unit testing in C++
- Host: GitHub
- URL: https://github.com/joakimkarlsson/igloo
- Owner: joakimkarlsson
- License: bsl-1.0
- Created: 2009-11-23T19:20:32.000Z (almost 15 years ago)
- Default Branch: master
- Last Pushed: 2022-06-17T08:19:59.000Z (over 2 years ago)
- Last Synced: 2024-07-31T22:50:42.946Z (3 months ago)
- Language: C++
- Homepage:
- Size: 5.24 MB
- Stars: 151
- Watchers: 16
- Forks: 32
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE_1_0.txt
Awesome Lists containing this project
README
igloo
=====
[![Build Status](https://travis-ci.org/joakimkarlsson/igloo.png)](https://travis-ci.org/joakimkarlsson/igloo)A framework for unit testing in C++
Igloo is a unit testing framework for C++ that aims to:
* stay out of your way and let you focus on what you want to test
* help you create readable tests
* have a syntax that doesn’t make you repeat yourself## Example
The following is a complete test application written in Igloo
```C++
#include
using namespace igloo;Describe(a_guitar_with_a_fuzzbox)
{
void SetUp()
{
guitar.AddEffect(fuzzbox);
}It(starts_in_clean_mode)
{
Assert::That(guitar.Sound(), Equals(Clean));
}Describe(in_distorted_mode)
{
void SetUp()
{
Parent().fuzzbox.Switch();
}It(sounds_distorted)
{
Assert::That(Parent().guitar.Sound(), Equals(Distorted));
}It(sounds_clean_when_I_switch_the_fuzzbox)
{
Parent().fuzzbox.Switch();
Assert::That(Parent().guitar.Sound(), Equals(Clean));
}
};Fuzzbox fuzzbox;
Guitar guitar;
};int main(int argc, const char *argv[])
{
return TestRunner::RunAllTests(argc, argv);
}
```