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

Function TestCompare

Archive/releases/4/TestCompile.cpp:131–144  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected