Skip to content
Snippets Groups Projects
Commit bb30d408 authored by Ladislav Lhotka's avatar Ladislav Lhotka
Browse files

Update the test module.

parent 40cc1876
Branches
Tags
No related merge requests found
......@@ -116,7 +116,7 @@ def instance(data_model):
"test:contT": {
"bits": "dos cuatro",
"decimal64": 4.50,
"enumeration": "Phobos"
"enumeration": "Hearts"
}
}
"""
......@@ -250,7 +250,7 @@ def test_types(data_model):
en = ct.get_child("enumeration", "test").type
assert not en.contains("Mars")
assert not en.contains("Deimos")
assert en.enum["Phobos"] == 101
assert en.enum["Hearts"] == 101
bits = ct.get_child("bits", "test").type
assert bits.as_int(bits._convert_raw("dos cuatro")) == 10
with pytest.raises(YangTypeError):
......
......@@ -24,11 +24,12 @@ module defs {
typedef typC {
type enumeration {
enum Mars {
enum Spades {
value "100";
}
enum Phobos;
enum Deimos;
enum Hearts;
enum Diamonds;
enum Clubs;
}
}
......
......@@ -185,12 +185,13 @@ module test {
}
leaf enumeration {
type d:typC {
enum Phobos {
enum Hearts {
if-feature "feA and not feB";
}
enum Deimos {
enum Diamonds {
if-feature "feB";
}
enum Clubs;
}
}
leaf bits {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment