MCPcopy Create free account
hub / github.com/dcleblanc/SafeInt / TestCompare

Function TestCompare

Archive/releases/3/TestCompile.cpp:135–148  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

133
134template <typename T, typename U>
135void TestCompare()
136{
137 T t(1);
138 U u(1);
139 SafeInt<T> st;
140 SafeInt<U> su;
141
142 bool b = ((st > su) && (st > u) && (u > st));
143 bool b2 = ((st >= su) && (st >= u) && (u >= st));
144 bool b3 = ((st < su) && (st < u) && (u < st));
145 bool b4 = ((st <= su) && (st <= u) && (u <= st));
146 bool b5 = ((st == su) && (st == u) && (u == st) && (b4 == st) && (st == b3));
147 bool b6 = ((st != su) && (st != u) && (u != st) && (b4 != st) && (st != b3));
148}
149
150template <typename T, typename U>
151void TestShift()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected