• Home
  • Raw
  • Download

Lines Matching full:section

42 using google_breakpad::test_assembler::Section;
723 Section s; in TEST()
727 Section s(kBigEndian); in TEST()
730 // A fixture class for TestAssembler::Section tests.
733 Section section; member in SectionFixture
766 section.Append(data, sizeof(data)); in TEST_F()
767 ASSERT_TRUE(section.GetContents(&contents)); in TEST_F()
773 section.Append(data, sizeof(data)); in TEST_F()
774 section.Append(data, sizeof(data)); in TEST_F()
775 ASSERT_TRUE(section.GetContents(&contents)); in TEST_F()
785 section.Append(s1); in TEST_F()
786 section.Append(s2); in TEST_F()
787 ASSERT_TRUE(section.GetContents(&contents)); in TEST_F()
792 section.AppendCString("howdy"); in TEST_F()
793 section.AppendCString(""); in TEST_F()
794 section.AppendCString("there"); in TEST_F()
795 ASSERT_TRUE(section.GetContents(&contents)); in TEST_F()
800 section.AppendCString("howdy", 3); in TEST_F()
801 section.AppendCString("there", 5); in TEST_F()
802 section.AppendCString("fred", 6); in TEST_F()
803 section.AppendCString("natalie", 0); in TEST_F()
804 section.AppendCString("", 10); in TEST_F()
805 ASSERT_TRUE(section.GetContents(&contents)); in TEST_F()
810 section.Append((size_t) 10, '*'); in TEST_F()
811 ASSERT_TRUE(section.GetContents(&contents)); in TEST_F()
816 section.Append(kLittleEndian, 1, 42); in TEST_F()
817 ASSERT_TRUE(section.GetContents(&contents)); in TEST_F()
822 section.Append(kLittleEndian, 2, 0x15a1); in TEST_F()
823 ASSERT_TRUE(section.GetContents(&contents)); in TEST_F()
828 section.Append(kLittleEndian, 3, 0x59ae8d); in TEST_F()
829 ASSERT_TRUE(section.GetContents(&contents)); in TEST_F()
834 section.Append(kLittleEndian, 4, 0x51603c56); in TEST_F()
835 ASSERT_TRUE(section.GetContents(&contents)); in TEST_F()
840 section.Append(kLittleEndian, 5, 0x385e2803b4ULL); in TEST_F()
841 ASSERT_TRUE(section.GetContents(&contents)); in TEST_F()
846 section.Append(kLittleEndian, 6, 0xc7db9534dd1fULL); in TEST_F()
847 ASSERT_TRUE(section.GetContents(&contents)); in TEST_F()
852 section.Append(kLittleEndian, 7, 0x1445c9f1b843e6ULL); in TEST_F()
853 ASSERT_TRUE(section.GetContents(&contents)); in TEST_F()
858 section.Append(kLittleEndian, 8, 0xaf48019dfe5c01e5ULL); in TEST_F()
859 ASSERT_TRUE(section.GetContents(&contents)); in TEST_F()
864 section.Append(kBigEndian, 1, 0xd0ULL); in TEST_F()
865 ASSERT_TRUE(section.GetContents(&contents)); in TEST_F()
870 section.Append(kBigEndian, 2, 0x2e7eULL); in TEST_F()
871 ASSERT_TRUE(section.GetContents(&contents)); in TEST_F()
876 section.Append(kBigEndian, 3, 0x37dad6ULL); in TEST_F()
877 ASSERT_TRUE(section.GetContents(&contents)); in TEST_F()
882 section.Append(kBigEndian, 4, 0x715935c7ULL); in TEST_F()
883 ASSERT_TRUE(section.GetContents(&contents)); in TEST_F()
888 section.Append(kBigEndian, 5, 0x42baeb02b7ULL); in TEST_F()
889 ASSERT_TRUE(section.GetContents(&contents)); in TEST_F()
894 section.Append(kBigEndian, 6, 0xf1cdf10e7b18ULL); in TEST_F()
895 ASSERT_TRUE(section.GetContents(&contents)); in TEST_F()
900 section.Append(kBigEndian, 7, 0xf50a724f0b0d20ULL); in TEST_F()
901 ASSERT_TRUE(section.GetContents(&contents)); in TEST_F()
906 section.Append(kBigEndian, 8, 0xa6b2cb5e98dc9c16ULL); in TEST_F()
907 ASSERT_TRUE(section.GetContents(&contents)); in TEST_F()
913 section.Append(kLittleEndian, 1, l); in TEST_F()
915 ASSERT_TRUE(section.GetContents(&contents)); in TEST_F()
921 section.Append(kLittleEndian, 2, l); in TEST_F()
923 ASSERT_TRUE(section.GetContents(&contents)); in TEST_F()
929 section.Append(kLittleEndian, 3, l); in TEST_F()
931 ASSERT_TRUE(section.GetContents(&contents)); in TEST_F()
937 section.Append(kLittleEndian, 4, l); in TEST_F()
939 ASSERT_TRUE(section.GetContents(&contents)); in TEST_F()
945 section.Append(kLittleEndian, 5, l); in TEST_F()
947 ASSERT_TRUE(section.GetContents(&contents)); in TEST_F()
953 section.Append(kLittleEndian, 6, l); in TEST_F()
955 ASSERT_TRUE(section.GetContents(&contents)); in TEST_F()
961 section.Append(kLittleEndian, 7, l); in TEST_F()
963 ASSERT_TRUE(section.GetContents(&contents)); in TEST_F()
969 section.Append(kLittleEndian, 8, l); in TEST_F()
971 ASSERT_TRUE(section.GetContents(&contents)); in TEST_F()
977 section.Append(kBigEndian, 1, l); in TEST_F()
979 ASSERT_TRUE(section.GetContents(&contents)); in TEST_F()
985 section.Append(kBigEndian, 2, l); in TEST_F()
987 ASSERT_TRUE(section.GetContents(&contents)); in TEST_F()
993 section.Append(kBigEndian, 3, l); in TEST_F()
995 ASSERT_TRUE(section.GetContents(&contents)); in TEST_F()
1001 section.Append(kBigEndian, 4, l); in TEST_F()
1003 ASSERT_TRUE(section.GetContents(&contents)); in TEST_F()
1009 section.Append(kBigEndian, 5, l); in TEST_F()
1011 ASSERT_TRUE(section.GetContents(&contents)); in TEST_F()
1017 section.Append(kBigEndian, 6, l); in TEST_F()
1019 ASSERT_TRUE(section.GetContents(&contents)); in TEST_F()
1025 section.Append(kBigEndian, 7, l); in TEST_F()
1027 ASSERT_TRUE(section.GetContents(&contents)); in TEST_F()
1033 section.Append(kBigEndian, 8, l); in TEST_F()
1035 ASSERT_TRUE(section.GetContents(&contents)); in TEST_F()
1040 section.Append(1, 0x2a); in TEST_F()
1041 section.B8(0xd3U); in TEST_F()
1042 ASSERT_TRUE(section.GetContents(&contents)); in TEST_F()
1048 section.Append(1, 0x2a); in TEST_F()
1049 section.B8(l); in TEST_F()
1051 ASSERT_TRUE(section.GetContents(&contents)); in TEST_F()
1056 section.Append(1, 0x2a); in TEST_F()
1057 section.B16(0x472aU); in TEST_F()
1058 ASSERT_TRUE(section.GetContents(&contents)); in TEST_F()
1064 section.Append(1, 0x2a); in TEST_F()
1065 section.B16(l); in TEST_F()
1067 ASSERT_TRUE(section.GetContents(&contents)); in TEST_F()
1072 section.Append(1, 0x2a); in TEST_F()
1073 section.B32(0xbd412cbcU); in TEST_F()
1074 ASSERT_TRUE(section.GetContents(&contents)); in TEST_F()
1080 section.Append(1, 0x2a); in TEST_F()
1081 section.B32(l); in TEST_F()
1083 ASSERT_TRUE(section.GetContents(&contents)); in TEST_F()
1088 section.Append(1, 0x2a); in TEST_F()
1089 section.B64(0x3402a013111e68adULL); in TEST_F()
1090 ASSERT_TRUE(section.GetContents(&contents)); in TEST_F()
1097 section.Append(1, 0x2a); in TEST_F()
1098 section.B64(l); in TEST_F()
1100 ASSERT_TRUE(section.GetContents(&contents)); in TEST_F()
1106 section.Append(1, 0x2a); in TEST_F()
1107 section.L8(0x26U); in TEST_F()
1108 ASSERT_TRUE(section.GetContents(&contents)); in TEST_F()
1114 section.Append(1, 0x2a); in TEST_F()
1115 section.L8(l); in TEST_F()
1117 ASSERT_TRUE(section.GetContents(&contents)); in TEST_F()
1122 section.Append(1, 0x2a); in TEST_F()
1123 section.L16(0xca6dU); in TEST_F()
1124 ASSERT_TRUE(section.GetContents(&contents)); in TEST_F()
1130 section.Append(1, 0x2a); in TEST_F()
1131 section.L16(l); in TEST_F()
1133 ASSERT_TRUE(section.GetContents(&contents)); in TEST_F()
1138 section.Append(1, 0x2a); in TEST_F()
1139 section.L32(0x558f6181U); in TEST_F()
1140 ASSERT_TRUE(section.GetContents(&contents)); in TEST_F()
1146 section.Append(1, 0x2a); in TEST_F()
1147 section.L32(l); in TEST_F()
1149 ASSERT_TRUE(section.GetContents(&contents)); in TEST_F()
1154 section.Append(1, 0x2a); in TEST_F()
1155 section.L64(0x564384f7579515bfULL); in TEST_F()
1156 ASSERT_TRUE(section.GetContents(&contents)); in TEST_F()
1163 section.Append(1, 0x2a); in TEST_F()
1164 section.L64(l); in TEST_F()
1166 ASSERT_TRUE(section.GetContents(&contents)); in TEST_F()
1172 section.set_endianness(kBigEndian); in TEST_F()
1173 section.Append(1, 0x2a); in TEST_F()
1174 section.D8(0xe6U); in TEST_F()
1175 ASSERT_TRUE(section.GetContents(&contents)); in TEST_F()
1181 section.set_endianness(kBigEndian); in TEST_F()
1182 section.Append(1, 0x2a); in TEST_F()
1183 section.D8(l); in TEST_F()
1185 ASSERT_TRUE(section.GetContents(&contents)); in TEST_F()
1190 section.set_endianness(kBigEndian); in TEST_F()
1191 section.Append(1, 0x2a); in TEST_F()
1192 section.D16(0x83b1U); in TEST_F()
1193 ASSERT_TRUE(section.GetContents(&contents)); in TEST_F()
1199 section.set_endianness(kBigEndian); in TEST_F()
1200 section.Append(1, 0x2a); in TEST_F()
1201 section.D16(l); in TEST_F()
1203 ASSERT_TRUE(section.GetContents(&contents)); in TEST_F()
1208 section.set_endianness(kBigEndian); in TEST_F()
1209 section.Append(1, 0x2a); in TEST_F()
1210 section.D32(0xd0b0e431U); in TEST_F()
1211 ASSERT_TRUE(section.GetContents(&contents)); in TEST_F()
1217 section.set_endianness(kBigEndian); in TEST_F()
1218 section.Append(1, 0x2a); in TEST_F()
1219 section.D32(l); in TEST_F()
1221 ASSERT_TRUE(section.GetContents(&contents)); in TEST_F()
1226 section.set_endianness(kBigEndian); in TEST_F()
1227 section.Append(1, 0x2a); in TEST_F()
1228 section.D64(0xb109843500dbcb16ULL); in TEST_F()
1229 ASSERT_TRUE(section.GetContents(&contents)); in TEST_F()
1236 section.set_endianness(kBigEndian); in TEST_F()
1237 section.Append(1, 0x2a); in TEST_F()
1238 section.D64(l); in TEST_F()
1240 ASSERT_TRUE(section.GetContents(&contents)); in TEST_F()
1246 section.set_endianness(kLittleEndian); in TEST_F()
1247 section.Append(1, 0x2a); in TEST_F()
1248 section.D8(0x42U); in TEST_F()
1249 ASSERT_TRUE(section.GetContents(&contents)); in TEST_F()
1255 section.set_endianness(kLittleEndian); in TEST_F()
1256 section.Append(1, 0x2a); in TEST_F()
1257 section.D8(l); in TEST_F()
1259 ASSERT_TRUE(section.GetContents(&contents)); in TEST_F()
1264 section.set_endianness(kLittleEndian); in TEST_F()
1265 section.Append(1, 0x2a); in TEST_F()
1266 section.D16(0xc5c5U); in TEST_F()
1267 ASSERT_TRUE(section.GetContents(&contents)); in TEST_F()
1273 section.set_endianness(kLittleEndian); in TEST_F()
1274 section.Append(1, 0x2a); in TEST_F()
1275 section.D16(l); in TEST_F()
1277 ASSERT_TRUE(section.GetContents(&contents)); in TEST_F()
1282 section.set_endianness(kLittleEndian); in TEST_F()
1283 section.Append(1, 0x2a); in TEST_F()
1284 section.D32(0x1a87d0feU); in TEST_F()
1285 ASSERT_TRUE(section.GetContents(&contents)); in TEST_F()
1291 section.set_endianness(kLittleEndian); in TEST_F()
1292 section.Append(1, 0x2a); in TEST_F()
1293 section.D32(l); in TEST_F()
1295 ASSERT_TRUE(section.GetContents(&contents)); in TEST_F()
1300 section.set_endianness(kLittleEndian); in TEST_F()
1301 section.Append(1, 0x2a); in TEST_F()
1302 section.D64(0x42de75c61375a1deULL); in TEST_F()
1303 ASSERT_TRUE(section.GetContents(&contents)); in TEST_F()
1310 section.set_endianness(kLittleEndian); in TEST_F()
1311 section.Append(1, 0x2a); in TEST_F()
1312 section.D64(l); in TEST_F()
1314 ASSERT_TRUE(section.GetContents(&contents)); in TEST_F()
1321 section.Append(kBigEndian, 1, a) in TEST_F()
1361 ASSERT_EQ(8 * 18U, section.Size()); in TEST_F()
1362 ASSERT_TRUE(section.GetContents(&contents)); in TEST_F()
1386 TEST_F(Append, Section) { in TEST_F() argument
1387 section.Append("murder"); in TEST_F()
1389 Section middle; in TEST_F()
1391 section.Append(middle); in TEST_F()
1393 section.Append(" wrote"); in TEST_F()
1394 EXPECT_EQ(16U, section.Size()); in TEST_F()
1395 EXPECT_TRUE(section.GetContents(&contents)); in TEST_F()
1400 section.Append("sugar "); in TEST_F()
1403 Section middle; in TEST_F()
1406 section.Append(middle); in TEST_F()
1409 section.Append(" jazz"); in TEST_F()
1410 EXPECT_EQ(15U, section.Size()); in TEST_F()
1411 EXPECT_TRUE(section.GetContents(&contents)); in TEST_F()
1416 section.LEB128(0); in TEST_F()
1417 EXPECT_TRUE(section.GetContents(&contents)); in TEST_F()
1422 section.LEB128(0x3f); in TEST_F()
1423 EXPECT_TRUE(section.GetContents(&contents)); in TEST_F()
1428 section.LEB128(0x40); in TEST_F()
1429 EXPECT_TRUE(section.GetContents(&contents)); in TEST_F()
1434 section.LEB128(0x7f); in TEST_F()
1435 EXPECT_TRUE(section.GetContents(&contents)); in TEST_F()
1440 section.LEB128(0x80); in TEST_F()
1441 EXPECT_TRUE(section.GetContents(&contents)); in TEST_F()
1446 section.LEB128(0xff); in TEST_F()
1447 EXPECT_TRUE(section.GetContents(&contents)); in TEST_F()
1452 section.LEB128(0x1fff); in TEST_F()
1453 EXPECT_TRUE(section.GetContents(&contents)); in TEST_F()
1458 section.LEB128(0x2000); in TEST_F()
1459 EXPECT_TRUE(section.GetContents(&contents)); in TEST_F()
1464 section.LEB128(-1); in TEST_F()
1465 EXPECT_TRUE(section.GetContents(&contents)); in TEST_F()
1470 section.LEB128(-0x40); in TEST_F()
1471 EXPECT_TRUE(section.GetContents(&contents)); in TEST_F()
1476 section.LEB128(-0x41); in TEST_F()
1477 EXPECT_TRUE(section.GetContents(&contents)); in TEST_F()
1482 section.LEB128(-0x7f); in TEST_F()
1483 EXPECT_TRUE(section.GetContents(&contents)); in TEST_F()
1488 section.LEB128(-0x80); in TEST_F()
1489 EXPECT_TRUE(section.GetContents(&contents)); in TEST_F()
1494 section.LEB128(-0x2000); in TEST_F()
1495 EXPECT_TRUE(section.GetContents(&contents)); in TEST_F()
1500 section.LEB128(-0x2001); in TEST_F()
1501 EXPECT_TRUE(section.GetContents(&contents)); in TEST_F()
1506 section.ULEB128(0); in TEST_F()
1507 EXPECT_TRUE(section.GetContents(&contents)); in TEST_F()
1512 section.ULEB128(1); in TEST_F()
1513 EXPECT_TRUE(section.GetContents(&contents)); in TEST_F()
1518 section.ULEB128(0x3f); in TEST_F()
1519 EXPECT_TRUE(section.GetContents(&contents)); in TEST_F()
1524 section.ULEB128(0x40); in TEST_F()
1525 EXPECT_TRUE(section.GetContents(&contents)); in TEST_F()
1530 section.ULEB128(0x7f); in TEST_F()
1531 EXPECT_TRUE(section.GetContents(&contents)); in TEST_F()
1536 section.ULEB128(0x80); in TEST_F()
1537 EXPECT_TRUE(section.GetContents(&contents)); in TEST_F()
1542 section.ULEB128(0xff); in TEST_F()
1543 EXPECT_TRUE(section.GetContents(&contents)); in TEST_F()
1548 section.ULEB128(0x100); in TEST_F()
1549 EXPECT_TRUE(section.GetContents(&contents)); in TEST_F()
1554 section.ULEB128(0x1fff); in TEST_F()
1555 EXPECT_TRUE(section.GetContents(&contents)); in TEST_F()
1560 section.ULEB128(0x2000); in TEST_F()
1561 EXPECT_TRUE(section.GetContents(&contents)); in TEST_F()
1566 section.ULEB128(0x3fff); in TEST_F()
1567 EXPECT_TRUE(section.GetContents(&contents)); in TEST_F()
1572 section.ULEB128(0x4000); in TEST_F()
1573 EXPECT_TRUE(section.GetContents(&contents)); in TEST_F()
1578 section.ULEB128(12857); in TEST_F()
1579 EXPECT_TRUE(section.GetContents(&contents)); in TEST_F()
1584 section.LEB128(-0x80).ULEB128(12857).Append("*"); in TEST_F()
1585 EXPECT_TRUE(section.GetContents(&contents)); in TEST_F()
1594 section.Append(kLittleEndian, 8, l); in TEST_F()
1595 ASSERT_FALSE(section.GetContents(&contents)); in TEST_F()
1599 section.Append((size_t) 10, '*'); in TEST_F()
1600 EXPECT_EQ(10U, section.Size()); in TEST_F()
1601 EXPECT_TRUE(section.GetContents(&contents)); in TEST_F()
1602 EXPECT_EQ(0U, section.Size()); in TEST_F()
1607 section.Append(kBigEndian, 1, l); in TEST_F()
1609 ASSERT_TRUE(section.GetContents(&contents)); in TEST_F()
1611 ASSERT_TRUE(section.GetContents(&contents)); // should not die in TEST_F()
1617 section.Append("howdy"); in TEST_F()
1619 section.L32(l); in TEST_F()
1620 EXPECT_EQ(9U, section.Size()); in TEST_F()
1621 section.Clear(); in TEST_F()
1622 EXPECT_EQ(0U, section.Size()); in TEST_F()
1624 ASSERT_TRUE(section.GetContents(&contents)); // should not die in TEST_F()
1628 section.Append("*"); in TEST_F()
1629 EXPECT_EQ(1U, section.Size()); in TEST_F()
1630 section.Align(4).Append("*"); in TEST_F()
1631 EXPECT_EQ(5U, section.Size()); in TEST_F()
1632 section.Append("*").Align(2); in TEST_F()
1633 EXPECT_EQ(6U, section.Size()); in TEST_F()
1637 section.Append("*"); in TEST_F()
1638 EXPECT_EQ(1U, section.Size()); in TEST_F()
1639 section.Align(4, ' ').Append("*"); in TEST_F()
1640 EXPECT_EQ(5U, section.Size()); in TEST_F()
1641 section.Append("*").Align(2, ' '); in TEST_F()
1642 EXPECT_EQ(6U, section.Size()); in TEST_F()
1643 ASSERT_TRUE(section.GetContents(&contents)); in TEST_F()
1649 section.Append(42, ' ').Mark(&m).Append(13, '+'); in TEST_F()
1650 EXPECT_EQ(42U, m - section.start()); in TEST_F()
1651 EXPECT_EQ(42U + 13U, section.Here() - section.start()); in TEST_F()
1652 EXPECT_FALSE(section.start().IsKnownConstant()); in TEST_F()
1654 EXPECT_FALSE(section.Here().IsKnownConstant()); in TEST_F()
1658 section.set_endianness(kBigEndian); in TEST_F()
1659 EXPECT_EQ(kBigEndian, section.endianness()); in TEST_F()
1660 section.set_endianness(kLittleEndian); in TEST_F()
1661 EXPECT_EQ(kLittleEndian, section.endianness()); in TEST_F()