Publishing 2019 R1 content
[platform/upstream/dldt.git] / inference-engine / tests / helpers / tests_utils.hpp
1 // Copyright (C) 2018-2019 Intel Corporation
2 // SPDX-License-Identifier: Apache-2.0
3 //
4
5 /**
6 * \brief TODO: short file description
7 * \file file_utils.h
8 */
9 #pragma once
10
11 #include <string>
12 #include <gtest/gtest.h>
13
14 namespace {
15     bool strContains(const std::string & str, const std::string & substr) {
16         return str.find(substr) != std::string::npos;
17     }
18     bool strDoesnotContain(const std::string & str, const std::string & substr) {
19         return !strContains(str, substr);
20     }
21 }
22
23 #define ASSERT_STR_CONTAINS(str, substr) ASSERT_PRED2(&strContains, str, substr)
24 #define ASSERT_STR_DOES_NOT_CONTAIN(str, substr) ASSERT_PRED2 (strDoesnotContain, str, substr)
25 #define EXPECT_STR_CONTAINS(str, substr) EXPECT_PRED2(&strContains, str, substr)