Skip to content
Snippets Groups Projects
Commit f4bcb7b8 authored by Shaun Roe's avatar Shaun Roe Committed by Johannes Junggeburth
Browse files

Add trivial tests

parent c251802d
Branches
Tags
1 merge request!445Add trivial tests
Pipeline #12008908 passed
Showing
with 244 additions and 0 deletions
...@@ -68,3 +68,4 @@ gtest_discover_tests(testRCBase) ...@@ -68,3 +68,4 @@ gtest_discover_tests(testRCBase)
gtest_discover_tests(testGeoGraphNode) gtest_discover_tests(testGeoGraphNode)
gtest_discover_tests(testGeoMaterial) gtest_discover_tests(testGeoMaterial)
gtest_discover_tests(testGeoElement) gtest_discover_tests(testGeoElement)
gtest_discover_tests(testGeoVolumeAction)
#include "GeoModelKernel/GeoAccessSurfaceAction.h"
#include <gtest/gtest.h>
#include <type_traits>
TEST(GeoAccessSurfaceAction, CannotBeMoveOrCopyConstructed) {
EXPECT_FALSE( std::is_copy_constructible_v<GeoAccessSurfaceAction>);
EXPECT_FALSE( std::is_move_constructible_v<GeoAccessSurfaceAction>);
}
TEST(GeoAccessSurfaceAction, CannotBeMoveOrCopyAssigned) {
EXPECT_FALSE(std::is_copy_assignable_v<GeoAccessSurfaceAction>);
EXPECT_FALSE(std::is_move_assignable_v<GeoAccessSurfaceAction>);
}
#include "GeoModelKernel/GeoClearAbsPosAction.h"
#include <gtest/gtest.h>
#include <type_traits>
TEST(GeoClearAbsPosAction, CannotBeMoveOrCopyConstructed) {
EXPECT_FALSE( std::is_copy_constructible_v<GeoClearAbsPosAction>);
EXPECT_FALSE( std::is_move_constructible_v<GeoClearAbsPosAction>);
}
TEST(GeoClearAbsPosAction, CannotBeMoveOrCopyAssigned) {
EXPECT_FALSE(std::is_copy_assignable_v<GeoClearAbsPosAction>);
EXPECT_FALSE(std::is_move_assignable_v<GeoClearAbsPosAction>);
}
#include "GeoModelKernel/GeoCountSurfaceAction.h"
#include <gtest/gtest.h>
#include <type_traits>
TEST(GeoCountSurfaceAction, CannotBeMoveOrCopyConstructed) {
EXPECT_FALSE( std::is_copy_constructible_v<GeoCountSurfaceAction>);
EXPECT_FALSE( std::is_move_constructible_v<GeoCountSurfaceAction>);
}
TEST(GeoCountSurfaceAction, CannotBeMoveOrCopyAssigned) {
EXPECT_FALSE(std::is_copy_assignable_v<GeoCountSurfaceAction>);
EXPECT_FALSE(std::is_move_assignable_v<GeoCountSurfaceAction>);
}
#include "GeoModelKernel/GeoCountVolAction.h"
#include <gtest/gtest.h>
#include <type_traits>
TEST(GeoCountVolAction, CannotBeMoveOrCopyConstructed) {
EXPECT_FALSE( std::is_copy_constructible_v<GeoCountVolAction>);
EXPECT_FALSE( std::is_move_constructible_v<GeoCountVolAction>);
}
TEST(GeoCountVolAction, CannotBeMoveOrCopyAssigned) {
EXPECT_FALSE(std::is_copy_assignable_v<GeoCountVolAction>);
EXPECT_FALSE(std::is_move_assignable_v<GeoCountVolAction>);
}
#include "GeoModelKernel/GeoCountVolAndSTAction.h"
#include <gtest/gtest.h>
#include <type_traits>
TEST(GeoCountVolAndSTAction, CannotBeMoveOrCopyConstructed) {
EXPECT_FALSE( std::is_copy_constructible_v<GeoCountVolAndSTAction>);
EXPECT_FALSE( std::is_move_constructible_v<GeoCountVolAndSTAction>);
}
TEST(GeoCountVolAndSTAction, CannotBeMoveOrCopyAssigned) {
EXPECT_FALSE(std::is_copy_assignable_v<GeoCountVolAndSTAction>);
EXPECT_FALSE(std::is_move_assignable_v<GeoCountVolAndSTAction>);
}
#include "GeoModelKernel/GeoShapeAction.h"
#include <gtest/gtest.h>
#include <type_traits>
TEST(GeoShapeAction, CannotBeMoveOrCopyConstructed) {
EXPECT_FALSE( std::is_copy_constructible_v<GeoShapeAction>);
EXPECT_FALSE( std::is_move_constructible_v<GeoShapeAction>);
}
TEST(GeoShapeAction, CannotBeMoveOrCopyAssigned) {
EXPECT_FALSE(std::is_copy_assignable_v<GeoShapeAction>);
EXPECT_FALSE(std::is_move_assignable_v<GeoShapeAction>);
}
\ No newline at end of file
#include "GeoModelKernel/GeoSurfaceCursor.h"
#include <gtest/gtest.h>
#include <type_traits>
TEST(GeoSurfaceCursor, CannotBeMoveOrCopyConstructed) {
EXPECT_FALSE( std::is_copy_constructible_v<GeoSurfaceCursor>);
EXPECT_FALSE( std::is_move_constructible_v<GeoSurfaceCursor>);
}
TEST(GeoSurfaceCursor, CannotBeMoveOrCopyAssigned) {
EXPECT_FALSE(std::is_copy_assignable_v<GeoSurfaceCursor>);
EXPECT_FALSE(std::is_move_assignable_v<GeoSurfaceCursor>);
}
#include "GeoModelKernel/GeoVDetectorFactory.h"
#include <gtest/gtest.h>
#include <type_traits>
TEST(GeoVDetectorFactory, CannotBeMoveOrCopyConstructed) {
EXPECT_FALSE( std::is_copy_constructible_v<GeoVDetectorFactory>);
EXPECT_FALSE( std::is_move_constructible_v<GeoVDetectorFactory>);
}
TEST(GeoVDetectorFactory, CannotBeMoveOrCopyAssigned) {
EXPECT_FALSE(std::is_copy_assignable_v<GeoVDetectorFactory>);
EXPECT_FALSE(std::is_move_assignable_v<GeoVDetectorFactory>);
}
#include "GeoModelKernel/GeoVG4ExtensionSolid.h"
#include <gtest/gtest.h>
#include <type_traits>
TEST(GeoVG4ExtensionSolid, CannotBeMoveOrCopyConstructed) {
EXPECT_FALSE( std::is_copy_constructible_v<GeoVG4ExtensionSolid>);
EXPECT_FALSE( std::is_move_constructible_v<GeoVG4ExtensionSolid>);
}
TEST(GeoVG4ExtensionSolid, CannotBeMoveOrCopyAssigned) {
EXPECT_FALSE(std::is_copy_assignable_v<GeoVG4ExtensionSolid>);
EXPECT_FALSE(std::is_move_assignable_v<GeoVG4ExtensionSolid>);
}
#include "GeoModelKernel/GeoVGeometryPlugin.h"
#include <gtest/gtest.h>
#include <type_traits>
TEST(GeoVGeometryPlugin, CannotBeMoveOrCopyConstructed) {
EXPECT_FALSE( std::is_copy_constructible_v<GeoVGeometryPlugin>);
EXPECT_FALSE( std::is_move_constructible_v<GeoVGeometryPlugin>);
}
TEST(GeoVGeometryPlugin, CannotBeMoveOrCopyAssigned) {
EXPECT_FALSE(std::is_copy_assignable_v<GeoVGeometryPlugin>);
EXPECT_FALSE(std::is_move_assignable_v<GeoVGeometryPlugin>);
}
/*
Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
*/
#include "GeoModelKernel/GeoVolumeAction.h"
#include <gtest/gtest.h>
#include <type_traits>
TEST(GeoVolumeAction, CanBeDefaultConstructed) {
EXPECT_NO_THROW([[maybe_unused]] GeoVolumeAction dummy);
}
TEST(GeoVolumeAction, ParametrisedCtorIsOk) {
EXPECT_NO_THROW([[maybe_unused]] GeoVolumeAction dummy{GeoVolumeAction::Type::BOTTOM_UP});
}
TEST(GeoVolumeAction, CannotBeMoveOrCopyConstructed) {
EXPECT_FALSE( std::is_copy_constructible_v<GeoVolumeAction>);
EXPECT_FALSE( std::is_move_constructible_v<GeoVolumeAction>);
}
TEST(GeoVolumeAction, CannotBeMoveOrCopyAssigned) {
EXPECT_FALSE(std::is_copy_assignable_v<GeoVolumeAction>);
EXPECT_FALSE(std::is_move_assignable_v<GeoVolumeAction>);
}
TEST(GeoVolumeAction, DefaultPropertiesAreOk) {
const GeoVolumeAction g;
EXPECT_EQ(g.shouldTerminate(), false);
EXPECT_NE(g.getState(), nullptr);
EXPECT_EQ(g.getType(), GeoVolumeAction::Type::TOP_DOWN);
//non-const
GeoVolumeAction h;
EXPECT_EQ(h.getType(), GeoVolumeAction::Type::TOP_DOWN);
EXPECT_NE(h.getState(), nullptr);
EXPECT_EQ(h.shouldTerminate(), false);
}
TEST(GeoVolumeAction, terminateSetsTerminateTrue) {
GeoVolumeAction g;//must be non-const
EXPECT_NO_THROW(g.terminate());
EXPECT_EQ(g.shouldTerminate(), true);
}
#include "GeoModelKernel/GeoVolumeCursor.h"
#include <gtest/gtest.h>
#include <type_traits>
TEST(GeoVolumeCursor, CannotBeMoveOrCopyConstructed) {
EXPECT_FALSE( std::is_copy_constructible_v<GeoVolumeCursor>);
EXPECT_FALSE( std::is_move_constructible_v<GeoVolumeCursor>);
}
TEST(GeoVolumeCursor, CannotBeMoveOrCopyAssigned) {
EXPECT_FALSE(std::is_copy_assignable_v<GeoVolumeCursor>);
EXPECT_FALSE(std::is_move_assignable_v<GeoVolumeCursor>);
}
#include "GeoModelKernel/GeoVolumeTagCatalog.h"
#include <gtest/gtest.h>
#include <type_traits>
TEST(GeoVolumeTagCatalog, CanBeMoveAndCopyConstructed) {
EXPECT_TRUE( std::is_copy_constructible_v<GeoVolumeTagCatalog>);
EXPECT_TRUE( std::is_move_constructible_v<GeoVolumeTagCatalog>);
}
TEST(GeoVolumeTagCatalog, CanBeMoveAndCopyAssigned) {
EXPECT_TRUE(std::is_copy_assignable_v<GeoVolumeTagCatalog>);
EXPECT_TRUE(std::is_move_assignable_v<GeoVolumeTagCatalog>);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment