OLD | NEW |
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ | 1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
2 /* | 2 /* |
3 * This program is free software; you can redistribute it and/or modify | 3 * This program is free software; you can redistribute it and/or modify |
4 * it under the terms of the GNU General Public License version 2 as | 4 * it under the terms of the GNU General Public License version 2 as |
5 * published by the Free Software Foundation; | 5 * published by the Free Software Foundation; |
6 * | 6 * |
7 * This program is distributed in the hope that it will be useful, | 7 * This program is distributed in the hope that it will be useful, |
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 8 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
10 * GNU General Public License for more details. | 10 * GNU General Public License for more details. |
(...skipping 713 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
724 // | 724 // |
725 // Initialize the pcap file header. | 725 // Initialize the pcap file header. |
726 // | 726 // |
727 f.Init (37, 43, -7); | 727 f.Init (37, 43, -7); |
728 NS_TEST_ASSERT_MSG_EQ (f.Fail (), false, "Init (37, 43, -7) returns error"); | 728 NS_TEST_ASSERT_MSG_EQ (f.Fail (), false, "Init (37, 43, -7) returns error"); |
729 | 729 |
730 // | 730 // |
731 // Initialize a buffer with a counting pattern to check the data later. | 731 // Initialize a buffer with a counting pattern to check the data later. |
732 // | 732 // |
733 uint8_t bufferOut[128]; | 733 uint8_t bufferOut[128]; |
734 for (uint32_t i = 0; i < 128; ++i) | 734 for (uint8_t i = 0; i < 128; ++i) |
735 { | 735 { |
736 bufferOut[i] = i; | 736 bufferOut[i] = i; |
737 } | 737 } |
738 | 738 |
739 // | 739 // |
740 // Now we should be able to write a packet to it since it was opened in "w"· | 740 // Now we should be able to write a packet to it since it was opened in "w"· |
741 // mode. The packet data written should be limited to 43 bytes in length· | 741 // mode. The packet data written should be limited to 43 bytes in length· |
742 // by the Init() call above. | 742 // by the Init() call above. |
743 // | 743 // |
744 f.Write (1234, 5678, bufferOut, 128); | 744 f.Write (1234, 5678, bufferOut, 128); |
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1163 AddTestCase (new WriteModeCreateTestCase, TestCase::QUICK); | 1163 AddTestCase (new WriteModeCreateTestCase, TestCase::QUICK); |
1164 AddTestCase (new ReadModeCreateTestCase, TestCase::QUICK); | 1164 AddTestCase (new ReadModeCreateTestCase, TestCase::QUICK); |
1165 //AddTestCase (new AppendModeCreateTestCase, TestCase::QUICK); | 1165 //AddTestCase (new AppendModeCreateTestCase, TestCase::QUICK); |
1166 AddTestCase (new FileHeaderTestCase, TestCase::QUICK); | 1166 AddTestCase (new FileHeaderTestCase, TestCase::QUICK); |
1167 AddTestCase (new RecordHeaderTestCase, TestCase::QUICK); | 1167 AddTestCase (new RecordHeaderTestCase, TestCase::QUICK); |
1168 AddTestCase (new ReadFileTestCase, TestCase::QUICK); | 1168 AddTestCase (new ReadFileTestCase, TestCase::QUICK); |
1169 AddTestCase (new DiffTestCase, TestCase::QUICK); | 1169 AddTestCase (new DiffTestCase, TestCase::QUICK); |
1170 } | 1170 } |
1171 | 1171 |
1172 static PcapFileTestSuite pcapFileTestSuite; //!< Static variable for test initia
lization | 1172 static PcapFileTestSuite pcapFileTestSuite; //!< Static variable for test initia
lization |
OLD | NEW |