From 611f62e73f7fc8643abcc1de6bd37e48fb139622 Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Thu, 17 Oct 2019 22:47:43 +0200 Subject: [PATCH] Removed debug leftover code --- src/db/db/dbNetlistDeviceExtractorClasses.cc | 3 --- src/db/unit_tests/dbDeepShapeStoreTests.cc | 13 +++++++++++++ 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/db/db/dbNetlistDeviceExtractorClasses.cc b/src/db/db/dbNetlistDeviceExtractorClasses.cc index 8d1a059f2..20215b670 100644 --- a/src/db/db/dbNetlistDeviceExtractorClasses.cc +++ b/src/db/db/dbNetlistDeviceExtractorClasses.cc @@ -92,7 +92,6 @@ db::Connectivity NetlistDeviceExtractorMOS3Transistor::get_connectivity (const d } else { - tl_assert (layers.size () >= 4); unsigned int sdiff = layers [0]; @@ -101,11 +100,9 @@ db::Connectivity NetlistDeviceExtractorMOS3Transistor::get_connectivity (const d // The layer definition is diff, gate db::Connectivity conn; -if (false) { // @@@ // collect all connected diffusion shapes conn.connect (sdiff, sdiff); conn.connect (ddiff, ddiff); -} // @@@ // collect all connected gate shapes conn.connect (gate, gate); // connect gate with diff to detect gate/diffusion boundary diff --git a/src/db/unit_tests/dbDeepShapeStoreTests.cc b/src/db/unit_tests/dbDeepShapeStoreTests.cc index 9ef242efe..f2f8eaf91 100644 --- a/src/db/unit_tests/dbDeepShapeStoreTests.cc +++ b/src/db/unit_tests/dbDeepShapeStoreTests.cc @@ -208,3 +208,16 @@ TEST(4_FlatAndEmptyInput) EXPECT_EQ ((dr1 - dr3).to_string (), "(0,0;0,1000;1000,1000;1000,0)"); } +TEST(5_State) +{ + db::DeepShapeStore store; + + store.set_threads (4); + EXPECT_EQ (store.threads (), 4); + store.push_state (); + store.set_threads (2); + EXPECT_EQ (store.threads (), 2); + store.pop_state (); + EXPECT_EQ (store.threads (), 4); +} +