-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.cpp
More file actions
38 lines (32 loc) · 750 Bytes
/
example.cpp
File metadata and controls
38 lines (32 loc) · 750 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#include "../include/xf_simple_test.h"
namespace xf::example
{
_xfTest(test_1)
{
_xfExpect(1 == 2); // error
_xfExpect(1 < 2); // ok
_xfExpect(1 > 2); // error
}
_xfTest(test_2)
{
_xfAssert(1 == 2); // error
_xfAssert(1 < 2); // ignore
_xfAssert(1 > 2); // ignore
}
}
_xfTest(test_3)
{
int a = 4, b = 2;
_xfExpect(a > b); // ok
_xfExpect(a < b); // error
_xfExpect(2 == a + b); // error
_xfExpect(2 == a - b); // ok
_xfExpect(2 == a / b); // ok
_xfAssert(2 == a * b); // error
_xfExpect(2 == a % b); // ignore
}
int main()
{
return xf::test::Test();
// return xf::test::Test({ "test_2", "test_3" });
}