Browse Source

Fix QA for 60-bit LSET.

jobs
Alex Shvartzkop 1 year ago
parent
commit
5f5e54f3d8
  1. 4
      qa/tests/common/test_lset.cpp
  2. 8
      qa/tests/pcbnew/test_lset.cpp

4
qa/tests/common/test_lset.cpp

@ -104,12 +104,12 @@ BOOST_AUTO_TEST_CASE(LSETFormatting)
LSET set({F_Cu, In1_Cu, In2_Cu});
std::string hexString = set.FmtHex();
std::string expectedHexString = "00000000_00000007"; // depends on bit ordering
std::string expectedHexString = "0000000_00000007"; // depends on bit ordering
BOOST_CHECK_EQUAL(hexString, expectedHexString);
std::string binString = set.FmtBin();
std::string expectedBinString = "0000_0000|0000_0000|0000_0000|0000_0000|0000_0000|0000_0000|0000_0000|0000_0111"; // depends on bit ordering
std::string expectedBinString = "0000|0000_0000|0000_0000|0000_0000|0000_0000|0000_0000|0000_0000|0000_0111"; // depends on bit ordering
BOOST_CHECK_EQUAL(binString, expectedBinString);
}

8
qa/tests/pcbnew/test_lset.cpp

@ -39,10 +39,10 @@ struct LSETS_TO_TEST
const static std::vector<LSETS_TO_TEST> type_to_ext_cases = {
{ LSET( { F_Cu, F_Fab } ), "00020000_00000001",
"0000_0000|0000_0010|0000_0000|0000_0000|0000_0000|0000_0000|0000_0000|0000_0001" },
{ LSET( { In14_Cu, B_Adhes, Rescue } ), "08000001_00004000",
"0000_1000|0000_0000|0000_0000|0000_0001|0000_0000|0000_0000|0100_0000|0000_0000" }
{ LSET( { F_Cu, F_Fab } ), "0020000_00000001",
"0000|0000_0010|0000_0000|0000_0000|0000_0000|0000_0000|0000_0000|0000_0001" },
{ LSET( { In14_Cu, B_Adhes, Rescue } ), "8000001_00004000",
"1000|0000_0000|0000_0000|0000_0001|0000_0000|0000_0000|0100_0000|0000_0000" }
};

Loading…
Cancel
Save