Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Kea
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Pavel Zhukov
Kea
Commits
135a80a7
Commit
135a80a7
authored
Oct 24, 2018
by
Tomek Mrugalski
🛰
Committed by
Francis Dupont
Oct 24, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[#65,!30] Negative checks moved to separate test.
parent
698e1530
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
src/lib/yang/tests/translator_utils_unittests.cc
src/lib/yang/tests/translator_utils_unittests.cc
+17
-0
No files found.
src/lib/yang/tests/translator_utils_unittests.cc
View file @
135a80a7
...
...
@@ -58,6 +58,7 @@ TEST(YangReprTest, item) {
// Test get with test module.
TEST
(
YangReprTest
,
getTest
)
{
// Get a translator object to play with.
S_Connection
conn
(
new
Connection
(
"utils unittests"
));
S_Session
sess
(
new
Session
(
conn
,
SR_DS_CANDIDATE
));
...
...
@@ -128,8 +129,24 @@ TEST(YangReprTest, getTest) {
// Verify.
EXPECT_TRUE
(
repr
.
verify
(
testTree
,
sess
,
cerr
));
}
// This test verifies that errors are handled properly.
TEST
(
YangReprTrest
,
getTestErrors
)
{
// Get a translator object to play with.
S_Connection
conn
(
new
Connection
(
"utils unittests"
));
S_Session
sess
(
new
Session
(
conn
,
SR_DS_CANDIDATE
));
// Get it.
YangRepr
repr
(
testModel
);
YRTree
tree
;
EXPECT_NO_THROW
(
repr
.
set
(
testTree
,
sess
));
// Verify.
EXPECT_TRUE
(
repr
.
verify
(
testTree
,
sess
,
cerr
));
// Some error messages will be displayed.
cout
<<
"Some error messages will be displayed. Please ignore."
<<
endl
;
// Change a path.
YRTree
badpath
=
testTree
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment