Publishing 2019 R1 content
[platform/upstream/dldt.git] / inference-engine / tests / unit / engines / gna / gna_cppwraper_test.cpp
1 // Copyright (C) 2019 Intel Corporation
2 // SPDX-License-Identifier: Apache-2.0
3 //
4
5 #ifndef _WIN32
6 #include <mm_malloc.h>
7 #endif
8 #include "gna_api_wrapper.hpp"
9 #include <gtest/gtest.h>
10
11 using namespace testing;
12 using namespace InferenceEngine;
13
14 class GNA_CPPWrapper_test : public ::testing::Test {};
15
16 TEST_F(GNA_CPPWrapper_test, CPPWrapperConstructorCannotWorkWithInputEqualToZero) {
17     ASSERT_THROW(GNAPluginNS::CPPWrapper<intel_nnet_type_t>(0), InferenceEngine::details::InferenceEngineException);
18 }
19
20 TEST_F(GNA_CPPWrapper_test, CPPWrapperConstructorCanWorkWithInputNotEqualToZero) {
21     ASSERT_NO_THROW(GNAPluginNS::CPPWrapper<intel_nnet_type_t>(3));
22 }
23
24 TEST_F(GNA_CPPWrapper_test, CPPWrapperConstructorCanWorkWithoutAnyInput) {
25     ASSERT_NO_THROW(GNAPluginNS::CPPWrapper<intel_nnet_type_t>());
26 }
27