MCPcopy Create free account
hub / github.com/boost-ext/ut / main

Function main

example/terse.cpp:29–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27};
28
29int main() {
30 using boost::ut::operator""_test;
31 using namespace boost::ut::literals;
32 using namespace boost::ut::operators::terse;
33
34 "terse"_test = [] {
35 6_i == sum(1, 2, 3);
36 sum(1, 1) == 2_i;
37 (42_i == sum(40, 2)) and (0_i != sum(1) or 4_i == 3);
38 };
39
40 // clang-format off
41 "terse type"_test = [] {
42 foo{.a = 42, .b = true}%_t == foo{42, true};
43 foo{.a = 43, .b = true} != foo{42, true}%_t;
44
45 constexpr auto make_foo = [](auto... args) { return foo{args...}; };
46 foo{42, true} == make_foo(42, true)%_t;
47 };
48 // clang-format on
49}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected