Add unit test macros prefixing test name with POSITIVE_ or NEGATIVE_ 01/236601/8
authorPawel Kowalski <p.kowalski2@partner.samsung.com>
Thu, 18 Jun 2020 11:17:13 +0000 (13:17 +0200)
committerMateusz Cegielka <m.cegielka@samsung.com>
Mon, 20 Jul 2020 11:42:57 +0000 (13:42 +0200)
Change-Id: I29deb31f64785686c2f5b0e9625fd12d3ec32cca

test/unit-tests/macros.h [new file with mode: 0644]

diff --git a/test/unit-tests/macros.h b/test/unit-tests/macros.h
new file mode 100644 (file)
index 0000000..7d9ec51
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ *  Copyright (c) 2020 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ *  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
+ *  limitations under the License
+ */
+
+#pragma once
+
+#include <boost/test/unit_test.hpp>
+
+#define POSITIVE_TEST_CASE(name) BOOST_AUTO_TEST_CASE(POSITIVE_ ## name)
+#define POSITIVE_FIXTURE_TEST_CASE(name, fixture) BOOST_FIXTURE_TEST_CASE(POSITIVE_ ## name, fixture)
+#define NEGATIVE_TEST_CASE(name) BOOST_AUTO_TEST_CASE(NEGATIVE_ ## name)
+#define NEGATIVE_FIXTURE_TEST_CASE(name, fixture) BOOST_FIXTURE_TEST_CASE(NEGATIVE_ ## name, fixture)