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

Function TestBitwise

Archive/releases/4/TestCompile.cpp:170–195  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

168
169template <typename T, typename U>
170void TestBitwise()
171{
172 SafeInt<T> st;
173 SafeInt<U> su;
174 U u;
175 SafeInt<T> st2;
176
177 // and
178 st2 = st & u;
179 st2 = u & st;
180 st &= u;
181 st &= su;
182
183 // or
184 st2 = st | u;
185 st2 = u | st;
186 st |= u;
187 st |= su;
188
189
190 // xor
191 st2 = st ^ u;
192 st2 = u ^ st;
193 st ^= u;
194 st ^= su;
195}
196
197template <typename T>
198void TestAtoI()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected