reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced

References

unittests/ADT/APIntTest.cpp
 1342   APInt(8, 0).toString(S, 2, true, true);
 1343   EXPECT_EQ(S.str().str(), "0b0");
 1344   S.clear();
 1345   APInt(8, 0).toString(S, 8, true, true);
 1346   EXPECT_EQ(S.str().str(), "00");
 1347   S.clear();
 1348   APInt(8, 0).toString(S, 10, true, true);
 1349   EXPECT_EQ(S.str().str(), "0");
 1350   S.clear();
 1351   APInt(8, 0).toString(S, 16, true, true);
 1352   EXPECT_EQ(S.str().str(), "0x0");
 1353   S.clear();
 1354   APInt(8, 0).toString(S, 36, true, false);
 1355   EXPECT_EQ(S.str().str(), "0");
 1356   S.clear();
 1359   APInt(8, 255, isSigned).toString(S, 2, isSigned, true);
 1360   EXPECT_EQ(S.str().str(), "0b11111111");
 1361   S.clear();
 1362   APInt(8, 255, isSigned).toString(S, 8, isSigned, true);
 1363   EXPECT_EQ(S.str().str(), "0377");
 1364   S.clear();
 1365   APInt(8, 255, isSigned).toString(S, 10, isSigned, true);
 1366   EXPECT_EQ(S.str().str(), "255");
 1367   S.clear();
 1368   APInt(8, 255, isSigned).toString(S, 16, isSigned, true);
 1369   EXPECT_EQ(S.str().str(), "0xFF");
 1370   S.clear();
 1371   APInt(8, 255, isSigned).toString(S, 36, isSigned, false);
 1372   EXPECT_EQ(S.str().str(), "73");
 1373   S.clear();
 1376   APInt(8, 255, isSigned).toString(S, 2, isSigned, true);
 1377   EXPECT_EQ(S.str().str(), "-0b1");
 1378   S.clear();
 1379   APInt(8, 255, isSigned).toString(S, 8, isSigned, true);
 1380   EXPECT_EQ(S.str().str(), "-01");
 1381   S.clear();
 1382   APInt(8, 255, isSigned).toString(S, 10, isSigned, true);
 1383   EXPECT_EQ(S.str().str(), "-1");
 1384   S.clear();
 1385   APInt(8, 255, isSigned).toString(S, 16, isSigned, true);
 1386   EXPECT_EQ(S.str().str(), "-0x1");
 1387   S.clear();
 1388   APInt(8, 255, isSigned).toString(S, 36, isSigned, false);
 1389   EXPECT_EQ(S.str().str(), "-1");
 1390   S.clear();