* Simplified plugin interface * Allow not implemented * Fixes * Fixed CPU plugin tests * Fixed tests dependencies * Fixes * Fixed GPU plugin compilation * Renamed plugin * Fixes * Removed tests for plugin base * Fix2 * Fix 2 * Define a macro to define plugin creation function * Clean-up * Fixed OSX build * Fixed CentOS * Fixed exception catch / throw * Fixed clang issue * Fixed python tests on macOsx
71 lines
2.5 KiB
C++
71 lines
2.5 KiB
C++
// Copyright (C) 2020 Intel Corporation
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
//
|
|
|
|
#include <gtest/gtest.h>
|
|
#include <cpp/ie_executable_network.hpp>
|
|
|
|
using namespace ::testing;
|
|
using namespace std;
|
|
using namespace InferenceEngine;
|
|
using namespace InferenceEngine::details;
|
|
|
|
TEST(ExecutableNetworkTests, throwsOnInitWithNull) {
|
|
std::shared_ptr<IExecutableNetwork> nlptr = nullptr;
|
|
ASSERT_THROW(ExecutableNetwork exec(nlptr), InferenceEngine::details::InferenceEngineException);
|
|
}
|
|
|
|
TEST(ExecutableNetworkTests, throwsOnUninitializedGetOutputsInfo) {
|
|
ExecutableNetwork exec;
|
|
ASSERT_THROW(exec.GetOutputsInfo(), InferenceEngine::details::InferenceEngineException);
|
|
}
|
|
|
|
TEST(ExecutableNetworkTests, throwsOnUninitializedGetInputsInfo) {
|
|
ExecutableNetwork exec;
|
|
ASSERT_THROW(exec.GetInputsInfo(), InferenceEngine::details::InferenceEngineException);
|
|
}
|
|
|
|
TEST(ExecutableNetworkTests, throwsOnUninitializedExport) {
|
|
ExecutableNetwork exec;
|
|
ASSERT_THROW(exec.Export(std::string()), InferenceEngine::details::InferenceEngineException);
|
|
}
|
|
|
|
TEST(ExecutableNetworkTests, throwsOnUninitializedExportStream) {
|
|
ExecutableNetwork exec;
|
|
ASSERT_THROW(exec.Export(std::cout), InferenceEngine::details::InferenceEngineException);
|
|
}
|
|
|
|
TEST(ExecutableNetworkTests, nothrowsOnUninitializedCast) {
|
|
ExecutableNetwork exec;
|
|
ASSERT_NO_THROW(auto &enet = static_cast<IExecutableNetwork::Ptr &>(exec));
|
|
}
|
|
|
|
TEST(ExecutableNetworkTests, throwsOnUninitializedGetExecGraphInfo) {
|
|
ExecutableNetwork exec;
|
|
ASSERT_THROW(exec.GetExecGraphInfo(), InferenceEngine::details::InferenceEngineException);
|
|
}
|
|
|
|
TEST(ExecutableNetworkTests, throwsOnUninitializedQueryState) {
|
|
ExecutableNetwork exec;
|
|
ASSERT_THROW(exec.QueryState(), InferenceEngine::details::InferenceEngineException);
|
|
}
|
|
|
|
TEST(ExecutableNetworkTests, throwsOnUninitializedSetConfig) {
|
|
ExecutableNetwork exec;
|
|
ASSERT_THROW(exec.SetConfig({{}}), InferenceEngine::details::InferenceEngineException);
|
|
}
|
|
|
|
TEST(ExecutableNetworkTests, throwsOnUninitializedGetConfig) {
|
|
ExecutableNetwork exec;
|
|
ASSERT_THROW(exec.GetConfig({}), InferenceEngine::details::InferenceEngineException);
|
|
}
|
|
|
|
TEST(ExecutableNetworkTests, throwsOnUninitializedGetMetric) {
|
|
ExecutableNetwork exec;
|
|
ASSERT_THROW(exec.GetMetric({}), InferenceEngine::details::InferenceEngineException);
|
|
}
|
|
|
|
TEST(ExecutableNetworkTests, throwsOnUninitializedGetContext) {
|
|
ExecutableNetwork exec;
|
|
ASSERT_THROW(exec.GetContext(), InferenceEngine::details::InferenceEngineException);
|
|
} |