forked from openvinotoolkit/openvino
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvariable_state.cpp
33 lines (26 loc) · 898 Bytes
/
variable_state.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// Copyright (C) 2018-2022 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include <gtest/gtest.h>
#include <cpp/ie_infer_request.hpp>
using namespace ::testing;
using namespace std;
using namespace InferenceEngine;
using namespace InferenceEngine::details;
TEST(VariableStateCPPTests, throwsOnUninitializedReset) {
VariableState req;
ASSERT_THROW(req.Reset(), InferenceEngine::NotAllocated);
}
TEST(VariableStateCPPTests, throwsOnUninitializedGetname) {
VariableState req;
ASSERT_THROW(req.GetName(), InferenceEngine::NotAllocated);
}
TEST(VariableStateCPPTests, throwsOnUninitializedGetState) {
VariableState req;
ASSERT_THROW(req.GetState(), InferenceEngine::NotAllocated);
}
TEST(VariableStateCPPTests, throwsOnUninitializedSetState) {
VariableState req;
Blob::Ptr blob;
ASSERT_THROW(req.SetState(blob), InferenceEngine::NotAllocated);
}