From 84ea9e15c22b0231c836a8be9022e96cb204441f Mon Sep 17 00:00:00 2001 From: Andrew Loeliger Date: Thu, 23 Feb 2023 07:00:52 -0600 Subject: [PATCH] Fix BuildFile and code-format --- L1Trigger/L1TCaloLayer1/test/BuildFile.xml | 1 - .../test/testCICADAEmulation.cppunit.cc | 51 +++++++++---------- 2 files changed, 23 insertions(+), 29 deletions(-) diff --git a/L1Trigger/L1TCaloLayer1/test/BuildFile.xml b/L1Trigger/L1TCaloLayer1/test/BuildFile.xml index 4d8300b712b03..5709acca7491b 100644 --- a/L1Trigger/L1TCaloLayer1/test/BuildFile.xml +++ b/L1Trigger/L1TCaloLayer1/test/BuildFile.xml @@ -13,5 +13,4 @@ - \ No newline at end of file diff --git a/L1Trigger/L1TCaloLayer1/test/testCICADAEmulation.cppunit.cc b/L1Trigger/L1TCaloLayer1/test/testCICADAEmulation.cppunit.cc index 5fd82b187963d..cbb0575bc5fd6 100644 --- a/L1Trigger/L1TCaloLayer1/test/testCICADAEmulation.cppunit.cc +++ b/L1Trigger/L1TCaloLayer1/test/testCICADAEmulation.cppunit.cc @@ -1,7 +1,7 @@ //Test of the external CICADA model emulation model loading and model unloading //Developed by Andrew Loeliger, Princeton University, Feb 23, 2023 -//We can't test a load of a bad model here, since that is a segfault, not an exception, which is +//We can't test a load of a bad model here, since that is a segfault, not an exception, which is //OS level and cppunit cannot test against that in any way that qualifies as a success //TODO: However, it would be good in the future to assure that loading multiple CICADA models at the @@ -19,39 +19,34 @@ #include #include "Utilities/Testing/interface/CppUnit_testdriver.icpp" -class test_CICADA: public CppUnit::TestFixture{ - CPPUNIT_TEST_SUITE(test_CICADA); - CPPUNIT_TEST(doModelV1Load); - CPPUNIT_TEST(doModelV2Load); - CPPUNIT_TEST(doMultiModelLoad); - CPPUNIT_TEST_SUITE_END(); - - public: - void doModelV1Load(); - void doModelV2Load(); - void doMultiModelLoad(); - - +class test_CICADA : public CppUnit::TestFixture { + CPPUNIT_TEST_SUITE(test_CICADA); + CPPUNIT_TEST(doModelV1Load); + CPPUNIT_TEST(doModelV2Load); + CPPUNIT_TEST(doMultiModelLoad); + CPPUNIT_TEST_SUITE_END(); + +public: + void doModelV1Load(); + void doModelV2Load(); + void doMultiModelLoad(); }; CPPUNIT_TEST_SUITE_REGISTRATION(test_CICADA); -void test_CICADA::doModelV1Load(){ - auto loader = hls4mlEmulator::ModelLoader("CICADAModel_v1"); - auto model = loader.load_model(); +void test_CICADA::doModelV1Load() { + auto loader = hls4mlEmulator::ModelLoader("CICADAModel_v1"); + auto model = loader.load_model(); } -void test_CICADA::doModelV2Load(){ - auto loader = hls4mlEmulator::ModelLoader("CICADAModel_v2"); - auto model = loader.load_model(); +void test_CICADA::doModelV2Load() { + auto loader = hls4mlEmulator::ModelLoader("CICADAModel_v2"); + auto model = loader.load_model(); } -void test_CICADA::doMultiModelLoad(){ - auto loader_v1 = hls4mlEmulator::ModelLoader("CICADAModel_v1"); - auto loader_v2 = hls4mlEmulator::ModelLoader("CICADAModel_v2"); - auto model_v1 = loader_v1.load_model(); - auto model_v2 = loader_v2.load_model(); +void test_CICADA::doMultiModelLoad() { + auto loader_v1 = hls4mlEmulator::ModelLoader("CICADAModel_v1"); + auto loader_v2 = hls4mlEmulator::ModelLoader("CICADAModel_v2"); + auto model_v1 = loader_v1.load_model(); + auto model_v2 = loader_v2.load_model(); } - - -