From 8b083a833007b7f34aac78f62616bd6401513a4b Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Tue, 12 May 2020 21:09:21 +0200 Subject: [PATCH] Added unit tests for db::Texts, renamed db unit test files so debugging is possible --- .../{dbArray.cc => dbArrayTests.cc} | 0 .../{dbBoxScanner.cc => dbBoxScannerTests.cc} | 0 src/db/unit_tests/{dbBox.cc => dbBoxTests.cc} | 0 .../{dbBoxTree.cc => dbBoxTreeTests.cc} | 0 ...GraphUtils.cc => dbCellGraphUtilsTests.cc} | 0 ...nerator.cc => dbCellHullGeneratorTests.cc} | 0 ...dbCellMapping.cc => dbCellMappingTests.cc} | 0 .../unit_tests/{dbCell.cc => dbCellTests.cc} | 0 .../unit_tests/{dbClip.cc => dbClipTests.cc} | 0 ...lations.cc => dbEdgePairRelationsTests.cc} | 0 .../{dbEdgePair.cc => dbEdgePairTests.cc} | 0 .../{dbEdgePairs.cc => dbEdgePairsTests.cc} | 0 ...geProcessor.cc => dbEdgeProcessorTests.cc} | 0 .../unit_tests/{dbEdge.cc => dbEdgeTests.cc} | 0 .../{dbEdges.cc => dbEdgesTests.cc} | 0 ...oContours.cc => dbEdgesToContoursTests.cc} | 0 .../{dbExpression.cc => dbExpressionTests.cc} | 0 ...LayerMapping.cc => dbLayerMappingTests.cc} | 0 .../{dbLayer.cc => dbLayerTests.cc} | 0 .../{dbLayoutDiff.cc => dbLayoutDiffTests.cc} | 0 .../{dbLayout.cc => dbLayoutTests.cc} | 0 ...dbLayoutUtils.cc => dbLayoutUtilsTests.cc} | 0 .../{dbLibraries.cc => dbLibrariesTests.cc} | 0 .../{dbMatrix.cc => dbMatrixTests.cc} | 0 .../{dbObject.cc => dbObjectTests.cc} | 0 .../{dbPCells.cc => dbPCellsTests.cc} | 0 .../unit_tests/{dbPath.cc => dbPathTests.cc} | 0 .../{dbPoint.cc => dbPointTests.cc} | 0 .../{dbPolygon.cc => dbPolygonTests.cc} | 0 ...tory.cc => dbPropertiesRepositoryTests.cc} | 0 .../{dbRegion.cc => dbRegionTests.cc} | 0 .../{dbShapeArray.cc => dbShapeArrayTests.cc} | 0 ...epository.cc => dbShapeRepositoryTests.cc} | 0 .../{dbShape.cc => dbShapeTests.cc} | 0 .../{dbShapes.cc => dbShapesTests.cc} | 0 .../unit_tests/{dbText.cc => dbTextTests.cc} | 0 src/db/unit_tests/dbTextsTests.cc | 175 ++++++++++++++++++ ...Processor.cc => dbTilingProcessorTests.cc} | 0 .../{dbTrans.cc => dbTransTests.cc} | 0 ...dthPath.cc => dbVariableWidthPathTests.cc} | 0 .../{dbVector.cc => dbVectorTests.cc} | 0 src/db/unit_tests/unit_tests.pro | 83 +++++---- 42 files changed, 217 insertions(+), 41 deletions(-) rename src/db/unit_tests/{dbArray.cc => dbArrayTests.cc} (100%) rename src/db/unit_tests/{dbBoxScanner.cc => dbBoxScannerTests.cc} (100%) rename src/db/unit_tests/{dbBox.cc => dbBoxTests.cc} (100%) rename src/db/unit_tests/{dbBoxTree.cc => dbBoxTreeTests.cc} (100%) rename src/db/unit_tests/{dbCellGraphUtils.cc => dbCellGraphUtilsTests.cc} (100%) rename src/db/unit_tests/{dbCellHullGenerator.cc => dbCellHullGeneratorTests.cc} (100%) rename src/db/unit_tests/{dbCellMapping.cc => dbCellMappingTests.cc} (100%) rename src/db/unit_tests/{dbCell.cc => dbCellTests.cc} (100%) rename src/db/unit_tests/{dbClip.cc => dbClipTests.cc} (100%) rename src/db/unit_tests/{dbEdgePairRelations.cc => dbEdgePairRelationsTests.cc} (100%) rename src/db/unit_tests/{dbEdgePair.cc => dbEdgePairTests.cc} (100%) rename src/db/unit_tests/{dbEdgePairs.cc => dbEdgePairsTests.cc} (100%) rename src/db/unit_tests/{dbEdgeProcessor.cc => dbEdgeProcessorTests.cc} (100%) rename src/db/unit_tests/{dbEdge.cc => dbEdgeTests.cc} (100%) rename src/db/unit_tests/{dbEdges.cc => dbEdgesTests.cc} (100%) rename src/db/unit_tests/{dbEdgesToContours.cc => dbEdgesToContoursTests.cc} (100%) rename src/db/unit_tests/{dbExpression.cc => dbExpressionTests.cc} (100%) rename src/db/unit_tests/{dbLayerMapping.cc => dbLayerMappingTests.cc} (100%) rename src/db/unit_tests/{dbLayer.cc => dbLayerTests.cc} (100%) rename src/db/unit_tests/{dbLayoutDiff.cc => dbLayoutDiffTests.cc} (100%) rename src/db/unit_tests/{dbLayout.cc => dbLayoutTests.cc} (100%) rename src/db/unit_tests/{dbLayoutUtils.cc => dbLayoutUtilsTests.cc} (100%) rename src/db/unit_tests/{dbLibraries.cc => dbLibrariesTests.cc} (100%) rename src/db/unit_tests/{dbMatrix.cc => dbMatrixTests.cc} (100%) rename src/db/unit_tests/{dbObject.cc => dbObjectTests.cc} (100%) rename src/db/unit_tests/{dbPCells.cc => dbPCellsTests.cc} (100%) rename src/db/unit_tests/{dbPath.cc => dbPathTests.cc} (100%) rename src/db/unit_tests/{dbPoint.cc => dbPointTests.cc} (100%) rename src/db/unit_tests/{dbPolygon.cc => dbPolygonTests.cc} (100%) rename src/db/unit_tests/{dbPropertiesRepository.cc => dbPropertiesRepositoryTests.cc} (100%) rename src/db/unit_tests/{dbRegion.cc => dbRegionTests.cc} (100%) rename src/db/unit_tests/{dbShapeArray.cc => dbShapeArrayTests.cc} (100%) rename src/db/unit_tests/{dbShapeRepository.cc => dbShapeRepositoryTests.cc} (100%) rename src/db/unit_tests/{dbShape.cc => dbShapeTests.cc} (100%) rename src/db/unit_tests/{dbShapes.cc => dbShapesTests.cc} (100%) rename src/db/unit_tests/{dbText.cc => dbTextTests.cc} (100%) create mode 100644 src/db/unit_tests/dbTextsTests.cc rename src/db/unit_tests/{dbTilingProcessor.cc => dbTilingProcessorTests.cc} (100%) rename src/db/unit_tests/{dbTrans.cc => dbTransTests.cc} (100%) rename src/db/unit_tests/{dbVariableWidthPath.cc => dbVariableWidthPathTests.cc} (100%) rename src/db/unit_tests/{dbVector.cc => dbVectorTests.cc} (100%) diff --git a/src/db/unit_tests/dbArray.cc b/src/db/unit_tests/dbArrayTests.cc similarity index 100% rename from src/db/unit_tests/dbArray.cc rename to src/db/unit_tests/dbArrayTests.cc diff --git a/src/db/unit_tests/dbBoxScanner.cc b/src/db/unit_tests/dbBoxScannerTests.cc similarity index 100% rename from src/db/unit_tests/dbBoxScanner.cc rename to src/db/unit_tests/dbBoxScannerTests.cc diff --git a/src/db/unit_tests/dbBox.cc b/src/db/unit_tests/dbBoxTests.cc similarity index 100% rename from src/db/unit_tests/dbBox.cc rename to src/db/unit_tests/dbBoxTests.cc diff --git a/src/db/unit_tests/dbBoxTree.cc b/src/db/unit_tests/dbBoxTreeTests.cc similarity index 100% rename from src/db/unit_tests/dbBoxTree.cc rename to src/db/unit_tests/dbBoxTreeTests.cc diff --git a/src/db/unit_tests/dbCellGraphUtils.cc b/src/db/unit_tests/dbCellGraphUtilsTests.cc similarity index 100% rename from src/db/unit_tests/dbCellGraphUtils.cc rename to src/db/unit_tests/dbCellGraphUtilsTests.cc diff --git a/src/db/unit_tests/dbCellHullGenerator.cc b/src/db/unit_tests/dbCellHullGeneratorTests.cc similarity index 100% rename from src/db/unit_tests/dbCellHullGenerator.cc rename to src/db/unit_tests/dbCellHullGeneratorTests.cc diff --git a/src/db/unit_tests/dbCellMapping.cc b/src/db/unit_tests/dbCellMappingTests.cc similarity index 100% rename from src/db/unit_tests/dbCellMapping.cc rename to src/db/unit_tests/dbCellMappingTests.cc diff --git a/src/db/unit_tests/dbCell.cc b/src/db/unit_tests/dbCellTests.cc similarity index 100% rename from src/db/unit_tests/dbCell.cc rename to src/db/unit_tests/dbCellTests.cc diff --git a/src/db/unit_tests/dbClip.cc b/src/db/unit_tests/dbClipTests.cc similarity index 100% rename from src/db/unit_tests/dbClip.cc rename to src/db/unit_tests/dbClipTests.cc diff --git a/src/db/unit_tests/dbEdgePairRelations.cc b/src/db/unit_tests/dbEdgePairRelationsTests.cc similarity index 100% rename from src/db/unit_tests/dbEdgePairRelations.cc rename to src/db/unit_tests/dbEdgePairRelationsTests.cc diff --git a/src/db/unit_tests/dbEdgePair.cc b/src/db/unit_tests/dbEdgePairTests.cc similarity index 100% rename from src/db/unit_tests/dbEdgePair.cc rename to src/db/unit_tests/dbEdgePairTests.cc diff --git a/src/db/unit_tests/dbEdgePairs.cc b/src/db/unit_tests/dbEdgePairsTests.cc similarity index 100% rename from src/db/unit_tests/dbEdgePairs.cc rename to src/db/unit_tests/dbEdgePairsTests.cc diff --git a/src/db/unit_tests/dbEdgeProcessor.cc b/src/db/unit_tests/dbEdgeProcessorTests.cc similarity index 100% rename from src/db/unit_tests/dbEdgeProcessor.cc rename to src/db/unit_tests/dbEdgeProcessorTests.cc diff --git a/src/db/unit_tests/dbEdge.cc b/src/db/unit_tests/dbEdgeTests.cc similarity index 100% rename from src/db/unit_tests/dbEdge.cc rename to src/db/unit_tests/dbEdgeTests.cc diff --git a/src/db/unit_tests/dbEdges.cc b/src/db/unit_tests/dbEdgesTests.cc similarity index 100% rename from src/db/unit_tests/dbEdges.cc rename to src/db/unit_tests/dbEdgesTests.cc diff --git a/src/db/unit_tests/dbEdgesToContours.cc b/src/db/unit_tests/dbEdgesToContoursTests.cc similarity index 100% rename from src/db/unit_tests/dbEdgesToContours.cc rename to src/db/unit_tests/dbEdgesToContoursTests.cc diff --git a/src/db/unit_tests/dbExpression.cc b/src/db/unit_tests/dbExpressionTests.cc similarity index 100% rename from src/db/unit_tests/dbExpression.cc rename to src/db/unit_tests/dbExpressionTests.cc diff --git a/src/db/unit_tests/dbLayerMapping.cc b/src/db/unit_tests/dbLayerMappingTests.cc similarity index 100% rename from src/db/unit_tests/dbLayerMapping.cc rename to src/db/unit_tests/dbLayerMappingTests.cc diff --git a/src/db/unit_tests/dbLayer.cc b/src/db/unit_tests/dbLayerTests.cc similarity index 100% rename from src/db/unit_tests/dbLayer.cc rename to src/db/unit_tests/dbLayerTests.cc diff --git a/src/db/unit_tests/dbLayoutDiff.cc b/src/db/unit_tests/dbLayoutDiffTests.cc similarity index 100% rename from src/db/unit_tests/dbLayoutDiff.cc rename to src/db/unit_tests/dbLayoutDiffTests.cc diff --git a/src/db/unit_tests/dbLayout.cc b/src/db/unit_tests/dbLayoutTests.cc similarity index 100% rename from src/db/unit_tests/dbLayout.cc rename to src/db/unit_tests/dbLayoutTests.cc diff --git a/src/db/unit_tests/dbLayoutUtils.cc b/src/db/unit_tests/dbLayoutUtilsTests.cc similarity index 100% rename from src/db/unit_tests/dbLayoutUtils.cc rename to src/db/unit_tests/dbLayoutUtilsTests.cc diff --git a/src/db/unit_tests/dbLibraries.cc b/src/db/unit_tests/dbLibrariesTests.cc similarity index 100% rename from src/db/unit_tests/dbLibraries.cc rename to src/db/unit_tests/dbLibrariesTests.cc diff --git a/src/db/unit_tests/dbMatrix.cc b/src/db/unit_tests/dbMatrixTests.cc similarity index 100% rename from src/db/unit_tests/dbMatrix.cc rename to src/db/unit_tests/dbMatrixTests.cc diff --git a/src/db/unit_tests/dbObject.cc b/src/db/unit_tests/dbObjectTests.cc similarity index 100% rename from src/db/unit_tests/dbObject.cc rename to src/db/unit_tests/dbObjectTests.cc diff --git a/src/db/unit_tests/dbPCells.cc b/src/db/unit_tests/dbPCellsTests.cc similarity index 100% rename from src/db/unit_tests/dbPCells.cc rename to src/db/unit_tests/dbPCellsTests.cc diff --git a/src/db/unit_tests/dbPath.cc b/src/db/unit_tests/dbPathTests.cc similarity index 100% rename from src/db/unit_tests/dbPath.cc rename to src/db/unit_tests/dbPathTests.cc diff --git a/src/db/unit_tests/dbPoint.cc b/src/db/unit_tests/dbPointTests.cc similarity index 100% rename from src/db/unit_tests/dbPoint.cc rename to src/db/unit_tests/dbPointTests.cc diff --git a/src/db/unit_tests/dbPolygon.cc b/src/db/unit_tests/dbPolygonTests.cc similarity index 100% rename from src/db/unit_tests/dbPolygon.cc rename to src/db/unit_tests/dbPolygonTests.cc diff --git a/src/db/unit_tests/dbPropertiesRepository.cc b/src/db/unit_tests/dbPropertiesRepositoryTests.cc similarity index 100% rename from src/db/unit_tests/dbPropertiesRepository.cc rename to src/db/unit_tests/dbPropertiesRepositoryTests.cc diff --git a/src/db/unit_tests/dbRegion.cc b/src/db/unit_tests/dbRegionTests.cc similarity index 100% rename from src/db/unit_tests/dbRegion.cc rename to src/db/unit_tests/dbRegionTests.cc diff --git a/src/db/unit_tests/dbShapeArray.cc b/src/db/unit_tests/dbShapeArrayTests.cc similarity index 100% rename from src/db/unit_tests/dbShapeArray.cc rename to src/db/unit_tests/dbShapeArrayTests.cc diff --git a/src/db/unit_tests/dbShapeRepository.cc b/src/db/unit_tests/dbShapeRepositoryTests.cc similarity index 100% rename from src/db/unit_tests/dbShapeRepository.cc rename to src/db/unit_tests/dbShapeRepositoryTests.cc diff --git a/src/db/unit_tests/dbShape.cc b/src/db/unit_tests/dbShapeTests.cc similarity index 100% rename from src/db/unit_tests/dbShape.cc rename to src/db/unit_tests/dbShapeTests.cc diff --git a/src/db/unit_tests/dbShapes.cc b/src/db/unit_tests/dbShapesTests.cc similarity index 100% rename from src/db/unit_tests/dbShapes.cc rename to src/db/unit_tests/dbShapesTests.cc diff --git a/src/db/unit_tests/dbText.cc b/src/db/unit_tests/dbTextTests.cc similarity index 100% rename from src/db/unit_tests/dbText.cc rename to src/db/unit_tests/dbTextTests.cc diff --git a/src/db/unit_tests/dbTextsTests.cc b/src/db/unit_tests/dbTextsTests.cc new file mode 100644 index 000000000..df5ce9c2c --- /dev/null +++ b/src/db/unit_tests/dbTextsTests.cc @@ -0,0 +1,175 @@ + +/* + + KLayout Layout Viewer + Copyright (C) 2006-2020 Matthias Koefferlein + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +*/ + + +#include "tlUnitTest.h" + +#include "dbTexts.h" +#include "dbTextsUtils.h" +#include "dbEdges.h" +#include "dbRegion.h" + +TEST(1) +{ + db::Texts texts; + EXPECT_EQ (texts.empty (), true); + EXPECT_EQ (texts.bbox ().to_string (), "()"); + EXPECT_EQ (texts == db::Texts (), true); + EXPECT_EQ (texts < db::Texts (), false); + EXPECT_EQ (texts != db::Texts (), false); + texts.insert (db::Text ("abc", db::Trans (db::Vector (100, -200)))); + EXPECT_EQ (texts.empty (), false); + EXPECT_EQ (texts.size (), size_t (1)); + EXPECT_EQ (texts.bbox ().to_string (), "(100,-200;100,-200)"); + EXPECT_EQ (texts.to_string (), "('abc',r0 100,-200)"); + + texts.clear (); + EXPECT_EQ (texts.empty (), true); + EXPECT_EQ (texts.size (), size_t (0)); + EXPECT_EQ (texts.bbox ().to_string (), "()"); + texts.insert (db::Text ("uvw", db::Trans (db::Vector (110, 210)))); + EXPECT_EQ (texts == db::Texts (), false); + EXPECT_EQ (texts < db::Texts (), true); + EXPECT_EQ (texts != db::Texts (), true); + EXPECT_EQ (texts != texts, false); + EXPECT_EQ (texts == texts, true); + EXPECT_EQ (texts < texts, false); + EXPECT_EQ (texts.empty (), false); + EXPECT_EQ (texts.bbox ().to_string (), "(110,210;110,210)"); + EXPECT_EQ (texts.to_string (), "('uvw',r0 110,210)"); + + EXPECT_EQ (texts.transformed (db::ICplxTrans (2.0, 0.0, false, db::Vector ())).to_string (), "('uvw',r0 220,420)"); + EXPECT_EQ (texts.to_string (), "('uvw',r0 110,210)"); + texts.transform (db::ICplxTrans (3)); + EXPECT_EQ (texts.empty (), false); + EXPECT_EQ (texts.bbox ().to_string (), "(210,-110;210,-110)"); + EXPECT_EQ (texts.to_string (), "('uvw',r270 210,-110)"); + + db::Texts texts2; + EXPECT_EQ (texts2.empty (), true); + EXPECT_EQ (texts2.size (), size_t (0)); + EXPECT_EQ (texts2.bbox ().to_string (), "()"); + texts2.swap (texts); + EXPECT_EQ (texts.empty (), true); + EXPECT_EQ (texts.size (), size_t (0)); + EXPECT_EQ (texts.bbox ().to_string (), "()"); + EXPECT_EQ (texts2.empty (), false); + EXPECT_EQ (texts2.size (), size_t (1)); + EXPECT_EQ (texts2.bbox ().to_string (), "(210,-110;210,-110)"); +} + +TEST(2) +{ + db::Texts texts; + texts.insert (db::Text ("abc", db::Trans (db::Vector (100, -200)))); + texts.insert (db::Text ("uvw", db::Trans (db::Vector (110, 210)))); + + EXPECT_EQ (texts.to_string (), "('abc',r0 100,-200);('uvw',r0 110,210)"); + + db::Texts ee; + std::string s = texts.to_string (); + tl::Extractor ex (s.c_str ()); + EXPECT_EQ (ex.try_read (ee), true); + EXPECT_EQ (ee.to_string (), "('abc',r0 100,-200);('uvw',r0 110,210)"); + + db::Edges e; + texts.edges (e); + EXPECT_EQ (e.to_string (), "(100,-200;100,-200);(110,210;110,210)"); + + db::Region r; + texts.polygons (r); + EXPECT_EQ (r.to_string (), "(99,-201;99,-199;101,-199;101,-201);(109,209;109,211;111,211;111,209)"); +} + +TEST(3) +{ + db::Texts texts; + texts.insert (db::Text ("abc", db::Trans (db::Vector (100, -200)))); + texts.insert (db::Text ("uvw", db::Trans (db::Vector (110, 210)))); + + db::Texts tcopy = texts; + + db::TextStringFilter f ("abc", false); + EXPECT_EQ (texts.filtered (f).to_string (), "('abc',r0 100,-200)"); + texts.filter (f); + EXPECT_EQ (texts.to_string (), "('abc',r0 100,-200)"); + + texts = tcopy; + + db::TextStringFilter fi ("abc", true); + EXPECT_EQ (texts.filtered (fi).to_string (), "('uvw',r0 110,210)"); + texts.filter (fi); + EXPECT_EQ (texts.to_string (), "('uvw',r0 110,210)"); +} + +TEST(4) +{ + db::Texts texts; + texts.insert (db::Text ("abc", db::Trans (db::Vector (100, -200)))); + texts.insert (db::Text ("uvw", db::Trans (db::Vector (110, 210)))); + + db::Texts tcopy = texts; + + db::TextPatternFilter f ("*v*", false); + EXPECT_EQ (texts.filtered (f).to_string (), "('uvw',r0 110,210)"); + texts.filter (f); + EXPECT_EQ (texts.to_string (), "('uvw',r0 110,210)"); + + texts = tcopy; + + db::TextPatternFilter fi ("*v*", true); + EXPECT_EQ (texts.filtered (fi).to_string (), "('abc',r0 100,-200)"); + texts.filter (fi); + EXPECT_EQ (texts.to_string (), "('abc',r0 100,-200)"); +} + +TEST(5) +{ + db::Texts texts; + texts.insert (db::Text ("abc", db::Trans (db::Vector (100, -200)))); + texts.insert (db::Text ("uvw", db::Trans (db::Vector (110, 210)))); + + db::Layout ly; + unsigned int l1 = ly.insert_layer (db::LayerProperties (1, 0)); + db::cell_index_type top_cell = ly.add_cell ("TOP"); + + texts.insert_into_as_polygons (&ly, top_cell, l1, 1); + + db::Region r (db::RecursiveShapeIterator (ly, ly.cell (top_cell), l1)); + EXPECT_EQ (r.to_string (), "(99,-201;99,-199;101,-199;101,-201);(109,209;109,211;111,211;111,209)"); +} + +TEST(6) +{ + db::Texts texts; + texts.insert (db::Text ("abc", db::Trans (db::Vector (100, -200)))); + texts.insert (db::Text ("uvw", db::Trans (db::Vector (110, 210)))); + + db::Layout ly; + unsigned int l1 = ly.insert_layer (db::LayerProperties (1, 0)); + db::cell_index_type top_cell = ly.add_cell ("TOP"); + + texts.insert_into (&ly, top_cell, l1); + + db::Region r (db::RecursiveShapeIterator (ly, ly.cell (top_cell), l1)); + EXPECT_EQ (r.to_string (), "(-10,-21;9,20;50,51;91,80);(-10,-21;9,20;110,121;91,80)"); +} diff --git a/src/db/unit_tests/dbTilingProcessor.cc b/src/db/unit_tests/dbTilingProcessorTests.cc similarity index 100% rename from src/db/unit_tests/dbTilingProcessor.cc rename to src/db/unit_tests/dbTilingProcessorTests.cc diff --git a/src/db/unit_tests/dbTrans.cc b/src/db/unit_tests/dbTransTests.cc similarity index 100% rename from src/db/unit_tests/dbTrans.cc rename to src/db/unit_tests/dbTransTests.cc diff --git a/src/db/unit_tests/dbVariableWidthPath.cc b/src/db/unit_tests/dbVariableWidthPathTests.cc similarity index 100% rename from src/db/unit_tests/dbVariableWidthPath.cc rename to src/db/unit_tests/dbVariableWidthPathTests.cc diff --git a/src/db/unit_tests/dbVector.cc b/src/db/unit_tests/dbVectorTests.cc similarity index 100% rename from src/db/unit_tests/dbVector.cc rename to src/db/unit_tests/dbVectorTests.cc diff --git a/src/db/unit_tests/unit_tests.pro b/src/db/unit_tests/unit_tests.pro index 5aa37d85e..20e692741 100644 --- a/src/db/unit_tests/unit_tests.pro +++ b/src/db/unit_tests/unit_tests.pro @@ -7,47 +7,7 @@ TARGET = db_tests include($$PWD/../../lib_ut.pri) SOURCES = \ - dbArray.cc \ - dbBox.cc \ - dbBoxScanner.cc \ - dbBoxTree.cc \ - dbCell.cc \ - dbCellGraphUtils.cc \ - dbCellHullGenerator.cc \ - dbCellMapping.cc \ - dbClip.cc \ - dbExpression.cc \ - dbEdge.cc \ - dbEdgePair.cc \ - dbEdgePairRelations.cc \ - dbEdgePairs.cc \ - dbEdgeProcessor.cc \ - dbEdges.cc \ - dbEdgesToContours.cc \ - dbLayer.cc \ - dbLayerMapping.cc \ - dbLayout.cc \ - dbLayoutDiff.cc \ - dbLayoutUtils.cc \ - dbLibraries.cc \ - dbMatrix.cc \ - dbObject.cc \ - dbPath.cc \ - dbPCells.cc \ - dbPoint.cc \ - dbPolygon.cc \ - dbPropertiesRepository.cc \ - dbRegion.cc \ - dbShapeArray.cc \ - dbShape.cc \ - dbShapeRepository.cc \ - dbShapes.cc \ - dbText.cc \ - dbTilingProcessor.cc \ - dbTrans.cc \ - dbVector.cc \ dbWriterTools.cc \ - dbVariableWidthPath.cc \ dbLoadLayoutOptionsTests.cc \ dbSaveLayoutOptionsTests.cc \ dbHierarchyBuilderTests.cc \ @@ -73,7 +33,48 @@ SOURCES = \ dbLayoutQueryTests.cc \ dbPolygonToolsTests.cc \ dbTechnologyTests.cc \ - dbStreamLayerTests.cc + dbStreamLayerTests.cc \ + dbVectorTests.cc \ + dbVariableWidthPathTests.cc \ + dbTransTests.cc \ + dbTilingProcessorTests.cc \ + dbTextsTests.cc \ + dbTextTests.cc \ + dbShapesTests.cc \ + dbShapeRepositoryTests.cc \ + dbShapeArrayTests.cc \ + dbShapeTests.cc \ + dbRegionTests.cc \ + dbPropertiesRepositoryTests.cc \ + dbPolygonTests.cc \ + dbPointTests.cc \ + dbPCellsTests.cc \ + dbPathTests.cc \ + dbObjectTests.cc \ + dbMatrixTests.cc \ + dbLibrariesTests.cc \ + dbLayoutUtilsTests.cc \ + dbLayoutDiffTests.cc \ + dbLayoutTests.cc \ + dbLayerMappingTests.cc \ + dbLayerTests.cc \ + dbExpressionTests.cc \ + dbEdgesToContoursTests.cc \ + dbEdgesTests.cc \ + dbEdgeProcessorTests.cc \ + dbEdgePairsTests.cc \ + dbEdgePairRelationsTests.cc \ + dbEdgePairTests.cc \ + dbEdgeTests.cc \ + dbClipTests.cc \ + dbCellMappingTests.cc \ + dbCellHullGeneratorTests.cc \ + dbCellGraphUtilsTests.cc \ + dbCellTests.cc \ + dbBoxTreeTests.cc \ + dbBoxScannerTests.cc \ + dbBoxTests.cc \ + dbArrayTests.cc INCLUDEPATH += $$TL_INC $$DB_INC $$GSI_INC DEPENDPATH += $$TL_INC $$DB_INC $$GSI_INC