diff options
author | gatecat <gatecat@ds0.me> | 2021-03-15 18:48:10 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-15 18:48:10 +0000 |
commit | a751e0d9081477e33c620b5224ccd2026f2fa0cf (patch) | |
tree | cf6b25218aa5812cc41e3a0421098f920afe166b /fpga_interchange | |
parent | 34c511444eff51291fa732369e434ff687de310f (diff) | |
parent | 3fc3d598e7de5401e919823a8bc931fd4e81e761 (diff) | |
download | nextpnr-tests-a751e0d9081477e33c620b5224ccd2026f2fa0cf.tar.gz nextpnr-tests-a751e0d9081477e33c620b5224ccd2026f2fa0cf.tar.bz2 nextpnr-tests-a751e0d9081477e33c620b5224ccd2026f2fa0cf.zip |
Merge pull request #7 from litghost/use_namespace
Use NEXTPNR_NAMESPACE macro's now that headers are seperated.
Diffstat (limited to 'fpga_interchange')
-rw-r--r-- | fpga_interchange/bits.cc | 6 | ||||
-rw-r--r-- | fpga_interchange/dynamic_bitarray.cc | 13 |
2 files changed, 10 insertions, 9 deletions
diff --git a/fpga_interchange/bits.cc b/fpga_interchange/bits.cc index ac92edd..ef201b2 100644 --- a/fpga_interchange/bits.cc +++ b/fpga_interchange/bits.cc @@ -20,9 +20,9 @@ #include "gtest/gtest.h" #include "bits.h" -#include "nextpnr.h" +#include "nextpnr_namespaces.h" -namespace nextpnr { +NEXTPNR_NAMESPACE_BEGIN class BitsTest : public ::testing::Test { @@ -55,4 +55,4 @@ TEST_F(BitsTest, ctz) } } -}; // namespace nextpnr +NEXTPNR_NAMESPACE_END diff --git a/fpga_interchange/dynamic_bitarray.cc b/fpga_interchange/dynamic_bitarray.cc index 0e1a4a7..5b2d84d 100644 --- a/fpga_interchange/dynamic_bitarray.cc +++ b/fpga_interchange/dynamic_bitarray.cc @@ -19,10 +19,11 @@ #include "gtest/gtest.h" -#include "dynamic_bitarray.h" #include <climits> +#include "dynamic_bitarray.h" +#include "nextpnr_namespaces.h" -namespace nextpnr { +NEXTPNR_NAMESPACE_BEGIN class DynamicBitarrayTest : public ::testing::Test { @@ -32,7 +33,7 @@ TEST_F(DynamicBitarrayTest, oneshot) { for (size_t i = 0; i < 100; ++i) { std::vector<uint8_t> simple_storage; - nextpnr::DynamicBitarray<> bitarray; + DynamicBitarray<> bitarray; ASSERT_EQ(bitarray.bits_per_value(), size_t(CHAR_BIT)); simple_storage.resize(i); @@ -57,7 +58,7 @@ TEST_F(DynamicBitarrayTest, oneshot) TEST_F(DynamicBitarrayTest, resize) { std::vector<uint8_t> simple_storage; - nextpnr::DynamicBitarray<> bitarray; + DynamicBitarray<> bitarray; for (size_t i = 0; i < 100; ++i) { @@ -80,7 +81,7 @@ TEST_F(DynamicBitarrayTest, resize) TEST_F(DynamicBitarrayTest, fill) { - nextpnr::DynamicBitarray<> bitarray; + DynamicBitarray<> bitarray; for (size_t i = 0; i < 100; ++i) { bitarray.resize(i); @@ -97,4 +98,4 @@ TEST_F(DynamicBitarrayTest, fill) } } -}; // namespace nextpnr +NEXTPNR_NAMESPACE_END |