Lines Matching refs:Frm
10 class Frm(object): class
135 eq(pab, pba, Frm("multiplication does not commute for %r and %r", x, y))
136 eq(q, q2, Frm("divmod returns different quotient than / for %r and %r", x, y))
137 eq(r, r2, Frm("divmod returns different mod than %% for %r and %r", x, y))
138 eq(x, q*y + r, Frm("x != q*y + r after divmod on x=%r, y=%r", x, y))
140 self.assertTrue(0 <= r < y, Frm("bad mod from divmod on %r and %r", x, y))
142 self.assertTrue(y < r <= 0, Frm("bad mod from divmod on %r and %r", x, y))
203 Frm("bad result for a*b: a=%r, b=%r, x=%r, y=%r", a, b, x, y))
222 eq(x & 0, 0, Frm("x & 0 != 0 for x=%r", x))
223 eq(x | 0, x, Frm("x | 0 != x for x=%r", x))
224 eq(x ^ 0, x, Frm("x ^ 0 != x for x=%r", x))
225 eq(x & -1, x, Frm("x & -1 != x for x=%r", x))
226 eq(x | -1, -1, Frm("x | -1 != -1 for x=%r", x))
227 eq(x ^ -1, ~x, Frm("x ^ -1 != ~x for x=%r", x))
228 eq(x, ~~x, Frm("x != ~~x for x=%r", x))
229 eq(x & x, x, Frm("x & x != x for x=%r", x))
230 eq(x | x, x, Frm("x | x != x for x=%r", x))
231 eq(x ^ x, 0, Frm("x ^ x != 0 for x=%r", x))
232 eq(x & ~x, 0, Frm("x & ~x != 0 for x=%r", x))
233 eq(x | ~x, -1, Frm("x | ~x != -1 for x=%r", x))
234 eq(x ^ ~x, -1, Frm("x ^ ~x != -1 for x=%r", x))
235 eq(-x, 1 + ~x, Frm("not -x == 1 + ~x for x=%r", x))
236 eq(-x, ~(x-1), Frm("not -x == ~(x-1) forx =%r", x))
240 Frm("x << n >> n != x for x=%r, n=%r", x, n))
242 Frm("x // p2 != x >> n for x=%r n=%r p2=%r", x, n, p2))
244 Frm("x * p2 != x << n for x=%r n=%r p2=%r", x, n, p2))
246 Frm("not x & -p2 == x >> n << n for x=%r n=%r p2=%r", x, n, p2))
248 Frm("not x & -p2 == x & ~(p2 - 1) for x=%r n=%r p2=%r", x, n, p2))
252 eq(x & y, y & x, Frm("x & y != y & x for x=%r, y=%r", x, y))
253 eq(x | y, y | x, Frm("x | y != y | x for x=%r, y=%r", x, y))
254 eq(x ^ y, y ^ x, Frm("x ^ y != y ^ x for x=%r, y=%r", x, y))
255 eq(x ^ y ^ x, y, Frm("x ^ y ^ x != y for x=%r, y=%r", x, y))
256 eq(x & y, ~(~x | ~y), Frm("x & y != ~(~x | ~y) for x=%r, y=%r", x, y))
257 eq(x | y, ~(~x & ~y), Frm("x | y != ~(~x & ~y) for x=%r, y=%r", x, y))
259 Frm("x ^ y != (x | y) & ~(x & y) for x=%r, y=%r", x, y))
261 Frm("x ^ y == (x & ~y) | (~x & y) for x=%r, y=%r", x, y))
263 Frm("x ^ y == (x | y) & (~x | ~y) for x=%r, y=%r", x, y))
268 Frm("(x & y) & z != x & (y & z) for x=%r, y=%r, z=%r", x, y, z))
270 Frm("(x | y) | z != x | (y | z) for x=%r, y=%r, z=%r", x, y, z))
272 Frm("(x ^ y) ^ z != x ^ (y ^ z) for x=%r, y=%r, z=%r", x, y, z))
274 Frm("x & (y | z) != (x & y) | (x & z) for x=%r, y=%r, z=%r", x, y, z))
276 Frm("x | (y & z) != (x | y) & (x | z) for x=%r, y=%r, z=%r", x, y, z))
311 msg = Frm("%s returned %r but expected %r for %r",
314 self.assertEqual(long(got, 0), x, Frm('long("%s", 0) != %r', got, x))
319 msg = Frm("%s returned %r but expected %r for %r",
665 Frm("for %r expected %r got %r", args, expected, got))
895 eq(Rcmp, xycmp, Frm("%r %r %d %d", x, y, Rcmp, xycmp))
896 eq(x == y, Rcmp == 0, Frm("%r == %r %d", x, y, Rcmp))
897 eq(x != y, Rcmp != 0, Frm("%r != %r %d", x, y, Rcmp))
898 eq(x < y, Rcmp < 0, Frm("%r < %r %d", x, y, Rcmp))
899 eq(x <= y, Rcmp <= 0, Frm("%r <= %r %d", x, y, Rcmp))
900 eq(x > y, Rcmp > 0, Frm("%r > %r %d", x, y, Rcmp))
901 eq(x >= y, Rcmp >= 0, Frm("%r >= %r %d", x, y, Rcmp))