Audit/syscall_rule_data.cpp
Lad/audit_event_handler.cpp
SecurityManager/data_provider.cpp
+ Utils/with_message_exception.cpp
${LAD_SRC_DIR}/Audit/Auditctl.cpp
${LAD_SRC_DIR}/Audit/Parser.cpp
--- /dev/null
+/*
+ * Copyright (c) 2015 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.
+ */
+/**
+ * @file tests/Utils/with_message_exception.cpp
+ * @author Oskar Świtalski <o.switalski@samsung.com>
+ * @version 1.0
+ */
+
+#include <gmock/gmock.h>
+#include <gtest/gtest.h>
+
+#include <Utils/WithMessageException.h>
+
+/**
+ * @brief WithMessageException should publicly inherit from std::exception
+ *
+ * Exception class must publicly inherit from another class, if child class is ought to be catched
+ * by parent class catch block.
+ *
+ * @test Scenario:
+ * - throw WithMessageException
+ * - check if std::exception could be catched
+ */
+TEST(WithMessageException, inherit_publicly_from_std_exception) {
+ EXPECT_THROW(throw Utils::WithMessageException(""), std::exception);
+}