Skip to content

Commit

Permalink
Add binary compilation of enumerations test
Browse files Browse the repository at this point in the history
  • Loading branch information
dpino committed May 30, 2017
1 parent 38d943f commit 3f6cf3f
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/lib/yang/binary.lua
Original file line number Diff line number Diff line change
Expand Up @@ -437,12 +437,30 @@ function selftest()
leaf-list integers { type uint32; }
leaf-list addrs { type inet:ipv4-address; }
typedef severity {
type enumeration {
enum indetermiante {
value 2;
}
enum minor {
value 3;
}
enum warning {
value 4;
}
}
}
container routes {
list route {
key addr;
leaf addr { type inet:ipv4-address; mandatory true; }
leaf port { type uint8 { range 0..11; } mandatory true; }
}
leaf severity {
type severity;
}
}
}]])
local data = data.load_data_for_schema(test_schema, [[
Expand All @@ -456,6 +474,7 @@ function selftest()
route { addr 1.2.3.4; port 1; }
route { addr 2.3.4.5; port 10; }
route { addr 3.4.5.6; port 2; }
severity minor;
}
]])

Expand Down

0 comments on commit 3f6cf3f

Please sign in to comment.