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

Function TestShift

Archive/releases/3/TestCompile.cpp:151–171  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

149
150template <typename T, typename U>
151void TestShift()
152{
153 SafeInt<T> st;
154 U u(1);
155 SafeInt<U> su(1);
156 SafeInt<T> st2;
157
158 st2 = st << u;
159 st2 = st << su;
160 st <<= u;
161 st <<= su;
162
163 st2 = st >> u;
164 st2 = st >> su;
165 st >>= u;
166 st >>= su;
167 u >>= su;
168 u <<= su;
169 st2 = u >> st;
170 st2 = u << st;
171}
172
173template <typename T, typename U>
174void TestBitwise()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected