* Revert "Fixed creation of C++ wrappers from old API (#5805)"
This reverts commit ffe03b6ed3.
* Removed deprecated API
* Fixes 2
63 lines
2.0 KiB
C++
63 lines
2.0 KiB
C++
// Copyright (C) 2018-2021 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, throwsOnUninitializedGetOutputsInfo) {
|
|
ExecutableNetwork exec;
|
|
ASSERT_THROW(exec.GetOutputsInfo(), InferenceEngine::NotAllocated);
|
|
}
|
|
|
|
TEST(ExecutableNetworkTests, throwsOnUninitializedGetInputsInfo) {
|
|
ExecutableNetwork exec;
|
|
ASSERT_THROW(exec.GetInputsInfo(), InferenceEngine::NotAllocated);
|
|
}
|
|
|
|
TEST(ExecutableNetworkTests, throwsOnUninitializedExport) {
|
|
ExecutableNetwork exec;
|
|
ASSERT_THROW(exec.Export(std::string()), InferenceEngine::NotAllocated);
|
|
}
|
|
|
|
TEST(ExecutableNetworkTests, throwsOnUninitializedExportStream) {
|
|
ExecutableNetwork exec;
|
|
ASSERT_THROW(exec.Export(std::cout), InferenceEngine::NotAllocated);
|
|
}
|
|
|
|
TEST(ExecutableNetworkTests, throwsOnUninitializedGetExecGraphInfo) {
|
|
ExecutableNetwork exec;
|
|
ASSERT_THROW(exec.GetExecGraphInfo(), InferenceEngine::NotAllocated);
|
|
}
|
|
|
|
TEST(ExecutableNetworkTests, throwsOnUninitializedQueryState) {
|
|
IE_SUPPRESS_DEPRECATED_START
|
|
ExecutableNetwork exec;
|
|
ASSERT_THROW(exec.QueryState(), InferenceEngine::NotAllocated);
|
|
IE_SUPPRESS_DEPRECATED_END
|
|
}
|
|
|
|
TEST(ExecutableNetworkTests, throwsOnUninitializedSetConfig) {
|
|
ExecutableNetwork exec;
|
|
ASSERT_THROW(exec.SetConfig({{}}), InferenceEngine::NotAllocated);
|
|
}
|
|
|
|
TEST(ExecutableNetworkTests, throwsOnUninitializedGetConfig) {
|
|
ExecutableNetwork exec;
|
|
ASSERT_THROW(exec.GetConfig({}), InferenceEngine::NotAllocated);
|
|
}
|
|
|
|
TEST(ExecutableNetworkTests, throwsOnUninitializedGetMetric) {
|
|
ExecutableNetwork exec;
|
|
ASSERT_THROW(exec.GetMetric({}), InferenceEngine::NotAllocated);
|
|
}
|
|
|
|
TEST(ExecutableNetworkTests, throwsOnUninitializedGetContext) {
|
|
ExecutableNetwork exec;
|
|
ASSERT_THROW(exec.GetContext(), InferenceEngine::NotAllocated);
|
|
} |