Files
openvino/ngraph/test/conditional_compilation/ngraph_cc_off.cpp

41 lines
788 B
C++

// Copyright (C) 2018-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include "gtest/gtest.h"
#include <ngraph/except.hpp>
#ifdef SELECTIVE_BUILD_ANALYZER
#define SELECTIVE_BUILD_ANALYZER_ON
#undef SELECTIVE_BUILD_ANALYZER
#elif defined(SELECTIVE_BUILD)
#define SELECTIVE_BUILD_ON
#undef SELECTIVE_BUILD
#endif
#include "../core/src/itt.hpp"
using namespace std;
TEST(conditional_compilation, op_scope_with_disabled_cc)
{
int n = 0;
// Simple scope is enabled
NGRAPH_OP_SCOPE(Scope0);
n = 42;
EXPECT_EQ(n, 42);
// Simple scope is disabled
NGRAPH_OP_SCOPE(Scope1);
n = 43;
EXPECT_EQ(n, 43);
}
#ifdef SELECTIVE_BUILD_ANALYZER_ON
#define SELECTIVE_BUILD_ANALYZER
#elif defined(SELECTIVE_BUILD_ON)
#define SELECTIVE_BUILD
#endif