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

Function TestShift

Archive/releases/4/TestCompile.cpp:147–167  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected