Merge branch 'master' into dev/neilmac/spec
This commit is contained in:
commit
cd80ef6146
3 files changed
+16
-1
No files matched your search
@@ -17,6 +17,7 @@
|
||||
#include <UnitTest++/UnitTest++.h>
|
||||
#include <gsl.h>
|
||||
#include <vector>
|
||||
#include <initializer_list>
|
||||
|
||||
using namespace std;
|
||||
using namespace gsl;
|
||||
@@ -52,6 +53,16 @@ SUITE(at_tests)
|
||||
|
||||
CHECK_THROW(at(a, 4), fail_fast);
|
||||
}
|
||||
|
||||
TEST(InitializerList)
|
||||
{
|
||||
std::initializer_list<int> a = { 1, 2, 3, 4 };
|
||||
|
||||
for (int i = 0; i < 4; ++i)
|
||||
CHECK(at(a, i) == i+1);
|
||||
|
||||
CHECK_THROW(at(a, 4), fail_fast);
|
||||
}
|
||||
}
|
||||
|
||||
int main(int, const char *[])
|
||||
|
||||
Reference in new issue
Block a user