summaryrefslogtreecommitdiff
path: root/tests/core.cpp
blob: 485e601ff0e5259f41642fc29f90ab85b1dc726d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include <forstio/test/suite.h>
#include <forstio/core/id.h>

namespace {
SAW_TEST("Basic ID functionality") {
		using namespace saw;
		struct foo {};

		id<foo> a{1};
		id<foo> b{1};
		id<foo> c{2};

		SAW_EXPECT(a == b, "Should be equal");
		SAW_EXPECT(a != c, "Shouldn't be equal");
		SAW_EXPECT(a.get_value() == 1, "Lost original value");
}
}