From 9e4d687144cd9dd4bbf8ed1281b41be96820ca2c Mon Sep 17 00:00:00 2001
From: Manuel Weberndorfer <manuel.weberndorfer@id.ethz.ch>
Date: Wed, 16 Feb 2022 17:39:28 +0000
Subject: [PATCH] test plugin definition

- add test in ae108::assembly namespace
- add test in other namespace (#99)
---
 assembly/test/CMakeLists.txt        |  1 +
 assembly/test/FeaturePlugin_Test.cc | 32 +++++++++++++++++++++++++++++
 2 files changed, 33 insertions(+)
 create mode 100644 assembly/test/FeaturePlugin_Test.cc

diff --git a/assembly/test/CMakeLists.txt b/assembly/test/CMakeLists.txt
index cb0a71dc..7ea527dd 100644
--- a/assembly/test/CMakeLists.txt
+++ b/assembly/test/CMakeLists.txt
@@ -21,6 +21,7 @@ add_executable(${PROJECT_NAME}-AssemblyTests
                ./ConcatenateFeaturePlugins_Test.cc
                ./DerivePluginsUniquely_Test.cc
                ./DeriveUniquely_Test.cc
+               ./FeaturePlugin_Test.cc
                ./HasUniqueTypeTrait_Test.cc
                ./IsSingleTypeTrait_Test.cc
                ./deserialize_Test.cc
diff --git a/assembly/test/FeaturePlugin_Test.cc b/assembly/test/FeaturePlugin_Test.cc
new file mode 100644
index 00000000..b1dc03f3
--- /dev/null
+++ b/assembly/test/FeaturePlugin_Test.cc
@@ -0,0 +1,32 @@
+// © 2022 ETH Zurich, Mechanics and Materials Lab
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+
+#include "ae108/assembly/FeaturePlugin.h"
+
+namespace {
+
+DEFINE_ASSEMBLER_PLUGIN(TestPlugin, testMethod, (double)) {}
+DEFINE_CONST_ASSEMBLER_PLUGIN(TestPluginConst, testMethodConst, (double)) {}
+
+} // namespace
+
+namespace ae108 {
+namespace assembly {
+namespace {
+
+DEFINE_ASSEMBLER_PLUGIN(TestPlugin, testMethod, (double)) {}
+DEFINE_CONST_ASSEMBLER_PLUGIN(TestPluginConst, testMethodConst, (double)) {}
+
+} // namespace
+} // namespace assembly
+} // namespace ae108
-- 
GitLab