[ONOS-3892,3895,3882,3883,3896]Unit test of yang container, list, leaf, leaf-list parser
Change-Id: Iae040d9d354e012584db8adc0aa7ff1ea4c099a0
diff --git a/src/test/resources/ConfigEmptyValue.yang b/src/test/resources/ConfigEmptyValue.yang
new file mode 100644
index 0000000..0d62956
--- /dev/null
+++ b/src/test/resources/ConfigEmptyValue.yang
@@ -0,0 +1,9 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ leaf invalid-interval {
+ type "uint16";
+ config ;
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/ConfigFalse.yang b/src/test/resources/ConfigFalse.yang
new file mode 100644
index 0000000..79dc5ac
--- /dev/null
+++ b/src/test/resources/ConfigFalse.yang
@@ -0,0 +1,14 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ leaf invalid-interval {
+ type "uint16";
+ units "seconds";
+ description "Interval before a route is declared invalid";
+ config false;
+ mandatory true;
+ status current;
+ reference "RFC 6020";
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/ConfigInvalidValue.yang b/src/test/resources/ConfigInvalidValue.yang
new file mode 100644
index 0000000..b2e7659
--- /dev/null
+++ b/src/test/resources/ConfigInvalidValue.yang
@@ -0,0 +1,9 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ leaf invalid-interval {
+ type "uint16";
+ config invalid;
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/ConfigTrue.yang b/src/test/resources/ConfigTrue.yang
new file mode 100644
index 0000000..70349a0
--- /dev/null
+++ b/src/test/resources/ConfigTrue.yang
@@ -0,0 +1,14 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ leaf invalid-interval {
+ type "uint16";
+ units "seconds";
+ description "Interval before a route is declared invalid";
+ config true;
+ mandatory true;
+ status current;
+ reference "RFC 6020";
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/ConfigWithoutStatementEnd.yang b/src/test/resources/ConfigWithoutStatementEnd.yang
new file mode 100644
index 0000000..0ae02af
--- /dev/null
+++ b/src/test/resources/ConfigWithoutStatementEnd.yang
@@ -0,0 +1,9 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ leaf invalid-interval {
+ type "uint16";
+ config false
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/ContainerInvalidIdentifier.yang b/src/test/resources/ContainerInvalidIdentifier.yang
new file mode 100644
index 0000000..eee1acd
--- /dev/null
+++ b/src/test/resources/ContainerInvalidIdentifier.yang
@@ -0,0 +1,14 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ container 1valid {
+ reference "RFC 6020";
+ leaf invalid-interval {
+ type "uint16";
+ units "seconds";
+ status current;
+ reference "RFC 6020";
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/ContainerRootNode.yang b/src/test/resources/ContainerRootNode.yang
new file mode 100644
index 0000000..441d717
--- /dev/null
+++ b/src/test/resources/ContainerRootNode.yang
@@ -0,0 +1,9 @@
+container valid {
+ reference "RFC 6020";
+ leaf invalid-interval {
+ type "uint16";
+ units "seconds";
+ status current;
+ reference "RFC 6020";
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/ContainerSubStatementCardinality.yang b/src/test/resources/ContainerSubStatementCardinality.yang
new file mode 100644
index 0000000..731e389
--- /dev/null
+++ b/src/test/resources/ContainerSubStatementCardinality.yang
@@ -0,0 +1,15 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ container valid {
+ reference "RFC 6020";
+ reference "RFC 6020";
+ leaf invalid-interval {
+ type "uint16";
+ units "seconds";
+ status current;
+ reference "RFC 6020";
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/ContainerSubStatementConfig.yang b/src/test/resources/ContainerSubStatementConfig.yang
new file mode 100644
index 0000000..736dcbc
--- /dev/null
+++ b/src/test/resources/ContainerSubStatementConfig.yang
@@ -0,0 +1,16 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ container valid {
+ config true;
+ leaf invalid-interval {
+ type "uint16";
+ units "seconds";
+ description "Interval before a route is declared invalid";
+ mandatory true;
+ status current;
+ reference "RFC 6020";
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/ContainerSubStatementContainer.yang b/src/test/resources/ContainerSubStatementContainer.yang
new file mode 100644
index 0000000..1f9f810
--- /dev/null
+++ b/src/test/resources/ContainerSubStatementContainer.yang
@@ -0,0 +1,15 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ container ospf {
+ container valid {
+ leaf invalid-interval {
+ type "uint16";
+ units "seconds";
+ status current;
+ reference "RFC 6020";
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/ContainerSubStatementDescription.yang b/src/test/resources/ContainerSubStatementDescription.yang
new file mode 100644
index 0000000..dc75d00
--- /dev/null
+++ b/src/test/resources/ContainerSubStatementDescription.yang
@@ -0,0 +1,18 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ container valid {
+ description "container description";
+ config true;
+ leaf invalid-interval {
+ type "uint16";
+ units "seconds";
+ description "Interval before a route is declared invalid";
+ mandatory true;
+ status current;
+ reference "RFC 6020";
+ }
+ }
+}
+
diff --git a/src/test/resources/ContainerSubStatementLeaf.yang b/src/test/resources/ContainerSubStatementLeaf.yang
new file mode 100644
index 0000000..c9a64e3
--- /dev/null
+++ b/src/test/resources/ContainerSubStatementLeaf.yang
@@ -0,0 +1,17 @@
+
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ container valid {
+ leaf invalid-interval {
+ type "uint16";
+ units "seconds";
+ description "Interval before a route is declared invalid";
+ config true;
+ mandatory true;
+ status current;
+ reference "RFC 6020";
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/ContainerSubStatementLeafList.yang b/src/test/resources/ContainerSubStatementLeafList.yang
new file mode 100644
index 0000000..a1877b6
--- /dev/null
+++ b/src/test/resources/ContainerSubStatementLeafList.yang
@@ -0,0 +1,17 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ container valid {
+ leaf-list invalid-interval {
+ type "uint16";
+ units "seconds";
+ description "Interval before a route is declared invalid";
+ config true;
+ min-elements 1;
+ max-elements unbounded;
+ status current;
+ reference "RFC 6020";
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/ContainerSubStatementList.yang b/src/test/resources/ContainerSubStatementList.yang
new file mode 100644
index 0000000..4450391
--- /dev/null
+++ b/src/test/resources/ContainerSubStatementList.yang
@@ -0,0 +1,16 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ container ospf {
+ list valid {
+ key "invalid";
+ leaf invalid-interval {
+ type "uint16";
+ units "seconds";
+ status current;
+ reference "RFC 6020";
+ }
+ }
+ }
+}
diff --git a/src/test/resources/ContainerSubStatementPresence.yang b/src/test/resources/ContainerSubStatementPresence.yang
new file mode 100644
index 0000000..d3a30dc
--- /dev/null
+++ b/src/test/resources/ContainerSubStatementPresence.yang
@@ -0,0 +1,14 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ container valid {
+ presence "invalid";
+ leaf invalid-interval {
+ type "uint16";
+ units "seconds";
+ status current;
+ reference "RFC 6020";
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/ContainerSubStatementReference.yang b/src/test/resources/ContainerSubStatementReference.yang
new file mode 100644
index 0000000..33f37fd
--- /dev/null
+++ b/src/test/resources/ContainerSubStatementReference.yang
@@ -0,0 +1,17 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ container valid {
+ reference "container reference";
+ config true;
+ leaf invalid-interval {
+ type "uint16";
+ units "seconds";
+ description "Interval before a route is declared invalid";
+ mandatory true;
+ status current;
+ reference "RFC 6020";
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/ContainerSubStatementStatus.yang b/src/test/resources/ContainerSubStatementStatus.yang
new file mode 100644
index 0000000..fdf907d
--- /dev/null
+++ b/src/test/resources/ContainerSubStatementStatus.yang
@@ -0,0 +1,17 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ container valid {
+ config true;
+ status obsolete;
+ leaf invalid-interval {
+ type "uint16";
+ units "seconds";
+ description "Interval before a route is declared invalid";
+ mandatory true;
+ status current;
+ reference "RFC 6020";
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/ContainerSubStatements.yang b/src/test/resources/ContainerSubStatements.yang
new file mode 100644
index 0000000..2611f97
--- /dev/null
+++ b/src/test/resources/ContainerSubStatements.yang
@@ -0,0 +1,18 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ container ospf {
+ presence "ospf logs";
+ config true;
+ description "container description";
+ status current;
+ reference "container reference";
+ leaf invalid-interval {
+ type "uint16";
+ units "seconds";
+ status current;
+ reference "RFC 6020";
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/DerivedTypeStatement.yang b/src/test/resources/DerivedTypeStatement.yang
new file mode 100644
index 0000000..c678822
--- /dev/null
+++ b/src/test/resources/DerivedTypeStatement.yang
@@ -0,0 +1,8 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ leaf invalid-interval {
+ type "hello";
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/DescriptionEmptyStatement.yang b/src/test/resources/DescriptionEmptyStatement.yang
new file mode 100644
index 0000000..f6c1c3d
--- /dev/null
+++ b/src/test/resources/DescriptionEmptyStatement.yang
@@ -0,0 +1,6 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ description "";
+}
\ No newline at end of file
diff --git a/src/test/resources/DescriptionStringConcat.yang b/src/test/resources/DescriptionStringConcat.yang
new file mode 100644
index 0000000..8bf0519
--- /dev/null
+++ b/src/test/resources/DescriptionStringConcat.yang
@@ -0,0 +1,9 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ leaf invalid-interval {
+ type "uint16";
+ description "Interval before a " + "route is declared invalid";
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/DescriptionValidStatement.yang b/src/test/resources/DescriptionValidStatement.yang
new file mode 100644
index 0000000..70349a0
--- /dev/null
+++ b/src/test/resources/DescriptionValidStatement.yang
@@ -0,0 +1,14 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ leaf invalid-interval {
+ type "uint16";
+ units "seconds";
+ description "Interval before a route is declared invalid";
+ config true;
+ mandatory true;
+ status current;
+ reference "RFC 6020";
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/DescriptionWithoutStatementEnd.yang b/src/test/resources/DescriptionWithoutStatementEnd.yang
new file mode 100644
index 0000000..ebd8c24
--- /dev/null
+++ b/src/test/resources/DescriptionWithoutStatementEnd.yang
@@ -0,0 +1,9 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ leaf invalid-interval {
+ type "uint16";
+ description "Interval before a " + "route is declared invalid"
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/IntegerTypeStatement.yang b/src/test/resources/IntegerTypeStatement.yang
new file mode 100644
index 0000000..ca2be38
--- /dev/null
+++ b/src/test/resources/IntegerTypeStatement.yang
@@ -0,0 +1,8 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ leaf invalid-interval {
+ type "uint16";
+ }
+}
diff --git a/src/test/resources/KeyWithoutStatementEnd.yang b/src/test/resources/KeyWithoutStatementEnd.yang
new file mode 100644
index 0000000..f56101a
--- /dev/null
+++ b/src/test/resources/KeyWithoutStatementEnd.yang
@@ -0,0 +1,14 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ list valid {
+ key "invalid"
+ leaf invalid-interval {
+ type "uint16";
+ units "seconds";
+ status current;
+ reference "RFC 6020";
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/LeafConfigInvalidCardinality.yang b/src/test/resources/LeafConfigInvalidCardinality.yang
new file mode 100644
index 0000000..d403a56
--- /dev/null
+++ b/src/test/resources/LeafConfigInvalidCardinality.yang
@@ -0,0 +1,15 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ leaf invalid-interval {
+ type "uint16";
+ units "seconds";
+ description "Interval before a route is declared invalid";
+ config true;
+ config false;
+ mandatory true;
+ status current;
+ reference "RFC 6020";
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/LeafInvalidIdentifier.yang b/src/test/resources/LeafInvalidIdentifier.yang
new file mode 100644
index 0000000..dbfff13
--- /dev/null
+++ b/src/test/resources/LeafInvalidIdentifier.yang
@@ -0,0 +1,14 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ leaf 1invalid-interval {
+ type "uint16";
+ units "seconds";
+ description "Interval before a route is declared invalid";
+ config true;
+ mandatory true;
+ status current;
+ reference "RFC 6020";
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/LeafInvalidStatement.yang b/src/test/resources/LeafInvalidStatement.yang
new file mode 100644
index 0000000..4d4f6f6
--- /dev/null
+++ b/src/test/resources/LeafInvalidStatement.yang
@@ -0,0 +1,14 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ leafs invalid-interval {
+ type "uint16";
+ units "seconds";
+ description "Interval before a route is declared invalid";
+ config true;
+ mandatory true;
+ status current;
+ reference "RFC 6020";
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/LeafListConfigInvalidCardinality.yang b/src/test/resources/LeafListConfigInvalidCardinality.yang
new file mode 100644
index 0000000..361a852
--- /dev/null
+++ b/src/test/resources/LeafListConfigInvalidCardinality.yang
@@ -0,0 +1,14 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ leaf-list invalid-interval {
+ type "uint16";
+ units "seconds";
+ description "Interval before a route is declared invalid";
+ config true;
+ config false;
+ status current;
+ reference "RFC 6020";
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/LeafListInvalidIdentifier.yang b/src/test/resources/LeafListInvalidIdentifier.yang
new file mode 100644
index 0000000..77c24d2
--- /dev/null
+++ b/src/test/resources/LeafListInvalidIdentifier.yang
@@ -0,0 +1,13 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ leaf-list 1invalid-interval {
+ type "uint16";
+ units "seconds";
+ description "Interval before a route is declared invalid";
+ config true;
+ status current;
+ reference "RFC 6020";
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/LeafListInvalidStatement.yang b/src/test/resources/LeafListInvalidStatement.yang
new file mode 100644
index 0000000..13e4b5f
--- /dev/null
+++ b/src/test/resources/LeafListInvalidStatement.yang
@@ -0,0 +1,13 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ leaflist invalid-interval {
+ type "uint16";
+ units "seconds";
+ description "Interval before a route is declared invalid";
+ config true;
+ status current;
+ reference "RFC 6020";
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/LeafListSubStatementConfig.yang b/src/test/resources/LeafListSubStatementConfig.yang
new file mode 100644
index 0000000..293e4a5
--- /dev/null
+++ b/src/test/resources/LeafListSubStatementConfig.yang
@@ -0,0 +1,13 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ leaf-list invalid-interval {
+ type "uint16";
+ units "seconds";
+ description "Interval before a route is declared invalid";
+ config true;
+ status current;
+ reference "RFC 6020";
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/LeafListSubStatementDescription.yang b/src/test/resources/LeafListSubStatementDescription.yang
new file mode 100644
index 0000000..293e4a5
--- /dev/null
+++ b/src/test/resources/LeafListSubStatementDescription.yang
@@ -0,0 +1,13 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ leaf-list invalid-interval {
+ type "uint16";
+ units "seconds";
+ description "Interval before a route is declared invalid";
+ config true;
+ status current;
+ reference "RFC 6020";
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/LeafListSubStatementMaxElements.yang b/src/test/resources/LeafListSubStatementMaxElements.yang
new file mode 100644
index 0000000..5ab2d0f
--- /dev/null
+++ b/src/test/resources/LeafListSubStatementMaxElements.yang
@@ -0,0 +1,9 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ leaf-list invalid-interval {
+ type "uint16";
+ max-elements 3;
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/LeafListSubStatementMinElements.yang b/src/test/resources/LeafListSubStatementMinElements.yang
new file mode 100644
index 0000000..fd71281
--- /dev/null
+++ b/src/test/resources/LeafListSubStatementMinElements.yang
@@ -0,0 +1,9 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ leaf-list invalid-interval {
+ type "uint16";
+ min-elements 3;
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/LeafListSubStatementReference.yang b/src/test/resources/LeafListSubStatementReference.yang
new file mode 100644
index 0000000..293e4a5
--- /dev/null
+++ b/src/test/resources/LeafListSubStatementReference.yang
@@ -0,0 +1,13 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ leaf-list invalid-interval {
+ type "uint16";
+ units "seconds";
+ description "Interval before a route is declared invalid";
+ config true;
+ status current;
+ reference "RFC 6020";
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/LeafListSubStatementStatus.yang b/src/test/resources/LeafListSubStatementStatus.yang
new file mode 100644
index 0000000..293e4a5
--- /dev/null
+++ b/src/test/resources/LeafListSubStatementStatus.yang
@@ -0,0 +1,13 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ leaf-list invalid-interval {
+ type "uint16";
+ units "seconds";
+ description "Interval before a route is declared invalid";
+ config true;
+ status current;
+ reference "RFC 6020";
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/LeafListSubStatementType.yang b/src/test/resources/LeafListSubStatementType.yang
new file mode 100644
index 0000000..0e5ab56
--- /dev/null
+++ b/src/test/resources/LeafListSubStatementType.yang
@@ -0,0 +1,8 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ leaf-list invalid-interval {
+ type "uint16";
+ }
+}
diff --git a/src/test/resources/LeafListSubStatementUnits.yang b/src/test/resources/LeafListSubStatementUnits.yang
new file mode 100644
index 0000000..293e4a5
--- /dev/null
+++ b/src/test/resources/LeafListSubStatementUnits.yang
@@ -0,0 +1,13 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ leaf-list invalid-interval {
+ type "uint16";
+ units "seconds";
+ description "Interval before a route is declared invalid";
+ config true;
+ status current;
+ reference "RFC 6020";
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/LeafListSubStatements.yang b/src/test/resources/LeafListSubStatements.yang
new file mode 100644
index 0000000..29dfdb2
--- /dev/null
+++ b/src/test/resources/LeafListSubStatements.yang
@@ -0,0 +1,14 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ leaf-list invalid-interval {
+ type "uint16";
+ units "seconds";
+ max-elements 3;
+ description "Interval before a route is declared invalid";
+ config true;
+ status current;
+ reference "RFC 6020";
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/LeafListUnitsInvalidCardinality.yang b/src/test/resources/LeafListUnitsInvalidCardinality.yang
new file mode 100644
index 0000000..996e49e
--- /dev/null
+++ b/src/test/resources/LeafListUnitsInvalidCardinality.yang
@@ -0,0 +1,14 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ leaf-list invalid-interval {
+ type "uint16";
+ units "seconds";
+ units "minutes";
+ description "Interval before a route is declared invalid";
+ config true;
+ status current;
+ reference "RFC 6020";
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/LeafListWithoutLeftBrace.yang b/src/test/resources/LeafListWithoutLeftBrace.yang
new file mode 100644
index 0000000..1196422
--- /dev/null
+++ b/src/test/resources/LeafListWithoutLeftBrace.yang
@@ -0,0 +1,13 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ leaf-list invalid-interval
+ type "uint16";
+ units "seconds";
+ description "Interval before a route is declared invalid";
+ config true;
+ status current;
+ reference "RFC 6020";
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/LeafMandatoryInvalidCardinality.yang b/src/test/resources/LeafMandatoryInvalidCardinality.yang
new file mode 100644
index 0000000..c275dd7
--- /dev/null
+++ b/src/test/resources/LeafMandatoryInvalidCardinality.yang
@@ -0,0 +1,15 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ leaf invalid-interval {
+ type "uint16";
+ units "seconds";
+ description "Interval before a route is declared invalid";
+ config true;
+ mandatory true;
+ mandatory false;
+ status current;
+ reference "RFC 6020";
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/LeafSubStatements.yang b/src/test/resources/LeafSubStatements.yang
new file mode 100644
index 0000000..70349a0
--- /dev/null
+++ b/src/test/resources/LeafSubStatements.yang
@@ -0,0 +1,14 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ leaf invalid-interval {
+ type "uint16";
+ units "seconds";
+ description "Interval before a route is declared invalid";
+ config true;
+ mandatory true;
+ status current;
+ reference "RFC 6020";
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/LeafWithoutLeftBrace.yang b/src/test/resources/LeafWithoutLeftBrace.yang
new file mode 100644
index 0000000..c2aa979
--- /dev/null
+++ b/src/test/resources/LeafWithoutLeftBrace.yang
@@ -0,0 +1,14 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ leaf invalid-interval
+ type "uint16";
+ units "seconds";
+ description "Interval before a route is declared invalid";
+ config true;
+ mandatory true;
+ status current;
+ reference "RFC 6020";
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/ListAsRootNode.yang b/src/test/resources/ListAsRootNode.yang
new file mode 100644
index 0000000..289525f
--- /dev/null
+++ b/src/test/resources/ListAsRootNode.yang
@@ -0,0 +1,9 @@
+list valid {
+ reference "RFC 6020";
+ leaf invalid-interval {
+ type "uint16";
+ units "seconds";
+ status current;
+ reference "RFC 6020";
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/ListInvalidIdentifier.yang b/src/test/resources/ListInvalidIdentifier.yang
new file mode 100644
index 0000000..c5f6a3a
--- /dev/null
+++ b/src/test/resources/ListInvalidIdentifier.yang
@@ -0,0 +1,15 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ list 1valid {
+ key "invalid-interval";
+ reference "RFC 6020";
+ leaf invalid-interval {
+ type "uint16";
+ units "seconds";
+ status current;
+ reference "RFC 6020";
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/ListStatementWithoutChild.yang b/src/test/resources/ListStatementWithoutChild.yang
new file mode 100644
index 0000000..5c006d7
--- /dev/null
+++ b/src/test/resources/ListStatementWithoutChild.yang
@@ -0,0 +1,8 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ list valid {
+ reference "RFC 6020";
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/ListSubStatementConfig.yang b/src/test/resources/ListSubStatementConfig.yang
new file mode 100644
index 0000000..55432fb
--- /dev/null
+++ b/src/test/resources/ListSubStatementConfig.yang
@@ -0,0 +1,17 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ list valid {
+ key "invalid-interval";
+ config true;
+ leaf invalid-interval {
+ type "uint16";
+ units "seconds";
+ description "Interval before a route is declared invalid";
+ mandatory true;
+ status current;
+ reference "RFC 6020";
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/ListSubStatementContainer.yang b/src/test/resources/ListSubStatementContainer.yang
new file mode 100644
index 0000000..a81bda5
--- /dev/null
+++ b/src/test/resources/ListSubStatementContainer.yang
@@ -0,0 +1,16 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ list ospf {
+ key "process-id";
+ container interface {
+ leaf invalid-interval {
+ type "uint16";
+ units "seconds";
+ status current;
+ reference "RFC 6020";
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/ListSubStatementDescription.yang b/src/test/resources/ListSubStatementDescription.yang
new file mode 100644
index 0000000..a8df3d7
--- /dev/null
+++ b/src/test/resources/ListSubStatementDescription.yang
@@ -0,0 +1,18 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ list valid {
+ key "invalid-interval";
+ description "list description";
+ config true;
+ leaf invalid-interval {
+ type "uint16";
+ units "seconds";
+ description "Interval before a route is declared invalid";
+ mandatory true;
+ status current;
+ reference "RFC 6020";
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/ListSubStatementKey.yang b/src/test/resources/ListSubStatementKey.yang
new file mode 100644
index 0000000..791013d
--- /dev/null
+++ b/src/test/resources/ListSubStatementKey.yang
@@ -0,0 +1,14 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ list valid {
+ key "invalid-interval";
+ leaf invalid-interval {
+ type "uint16";
+ units "seconds";
+ status current;
+ reference "RFC 6020";
+ }
+ }
+}
diff --git a/src/test/resources/ListSubStatementLeaf.yang b/src/test/resources/ListSubStatementLeaf.yang
new file mode 100644
index 0000000..59b92cc
--- /dev/null
+++ b/src/test/resources/ListSubStatementLeaf.yang
@@ -0,0 +1,17 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ list valid {
+ key "invalid-interval";
+ leaf invalid-interval {
+ type "uint16";
+ units "seconds";
+ description "Interval before a route is declared invalid";
+ config true;
+ mandatory true;
+ status current;
+ reference "RFC 6020";
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/ListSubStatementLeafList.yang b/src/test/resources/ListSubStatementLeafList.yang
new file mode 100644
index 0000000..5235295
--- /dev/null
+++ b/src/test/resources/ListSubStatementLeafList.yang
@@ -0,0 +1,17 @@
+
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ list valid {
+ key "invalid-interval";
+ leaf-list invalid-interval {
+ type "uint16";
+ units "seconds";
+ description "Interval before a route is declared invalid";
+ config true;
+ status current;
+ reference "RFC 6020";
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/ListSubStatementList.yang b/src/test/resources/ListSubStatementList.yang
new file mode 100644
index 0000000..14cf270
--- /dev/null
+++ b/src/test/resources/ListSubStatementList.yang
@@ -0,0 +1,17 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ list ospf {
+ key "process-id";
+ list valid {
+ key "invalid";
+ leaf invalid-interval {
+ type "uint16";
+ units "seconds";
+ status current;
+ reference "RFC 6020";
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/ListSubStatementMaxElements.yang b/src/test/resources/ListSubStatementMaxElements.yang
new file mode 100644
index 0000000..de6139e
--- /dev/null
+++ b/src/test/resources/ListSubStatementMaxElements.yang
@@ -0,0 +1,14 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ list valid {
+ key "invalid-interval";
+ max-elements 3;
+ leaf-list invalid-interval {
+ type "uint16";
+ units "seconds";
+ description "Interval before a route is declared invalid";
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/ListSubStatementMinElements.yang b/src/test/resources/ListSubStatementMinElements.yang
new file mode 100644
index 0000000..d6071e8
--- /dev/null
+++ b/src/test/resources/ListSubStatementMinElements.yang
@@ -0,0 +1,14 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ list valid {
+ key "invalid-interval";
+ min-elements 3;
+ leaf-list invalid-interval {
+ type "uint16";
+ units "seconds";
+ description "Interval before a route is declared invalid";
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/ListSubStatementReference.yang b/src/test/resources/ListSubStatementReference.yang
new file mode 100644
index 0000000..8adfa04
--- /dev/null
+++ b/src/test/resources/ListSubStatementReference.yang
@@ -0,0 +1,18 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ list valid {
+ key "invalid-interval";
+ reference "list reference";
+ config true;
+ leaf invalid-interval {
+ type "uint16";
+ units "seconds";
+ description "Interval before a route is declared invalid";
+ mandatory true;
+ status current;
+ reference "RFC 6020";
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/ListSubStatementStatus.yang b/src/test/resources/ListSubStatementStatus.yang
new file mode 100644
index 0000000..b88ac74
--- /dev/null
+++ b/src/test/resources/ListSubStatementStatus.yang
@@ -0,0 +1,18 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ list valid {
+ key "invalid-interval";
+ status current;
+ config true;
+ leaf invalid-interval {
+ type "uint16";
+ units "seconds";
+ description "Interval before a route is declared invalid";
+ mandatory true;
+ status current;
+ reference "RFC 6020";
+ }
+ }
+}
diff --git a/src/test/resources/ListSubStatements.yang b/src/test/resources/ListSubStatements.yang
new file mode 100644
index 0000000..f684780
--- /dev/null
+++ b/src/test/resources/ListSubStatements.yang
@@ -0,0 +1,20 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ list ospf {
+ key "process-id";
+ config true;
+ max-elements 10;
+ min-elements 3;
+ description "list description";
+ status current;
+ reference "list reference";
+ leaf invalid-interval {
+ type "uint16";
+ units "seconds";
+ status current;
+ reference "RFC 6020";
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/ListSubStatementsCardinality.yang b/src/test/resources/ListSubStatementsCardinality.yang
new file mode 100644
index 0000000..9c4077c
--- /dev/null
+++ b/src/test/resources/ListSubStatementsCardinality.yang
@@ -0,0 +1,16 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ list valid {
+ key "invalid-interval";
+ reference "RFC 6020";
+ reference "RFC 6020";
+ leaf invalid-interval {
+ type "uint16";
+ units "seconds";
+ status current;
+ reference "RFC 6020";
+ }
+ }
+}
diff --git a/src/test/resources/MandatoryDefaultValue.yang b/src/test/resources/MandatoryDefaultValue.yang
new file mode 100644
index 0000000..c71d5ea
--- /dev/null
+++ b/src/test/resources/MandatoryDefaultValue.yang
@@ -0,0 +1,8 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ leaf invalid-interval {
+ type "uint16";
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/MandatoryEmptyStatement.yang b/src/test/resources/MandatoryEmptyStatement.yang
new file mode 100644
index 0000000..e2af869
--- /dev/null
+++ b/src/test/resources/MandatoryEmptyStatement.yang
@@ -0,0 +1,9 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ leaf invalid-interval {
+ type "uint16";
+ mandatory ;
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/MandatoryFalse.yang b/src/test/resources/MandatoryFalse.yang
new file mode 100644
index 0000000..3ae4601
--- /dev/null
+++ b/src/test/resources/MandatoryFalse.yang
@@ -0,0 +1,9 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ leaf invalid-interval {
+ type "uint16";
+ mandatory false;
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/MandatoryTrue.yang b/src/test/resources/MandatoryTrue.yang
new file mode 100644
index 0000000..70349a0
--- /dev/null
+++ b/src/test/resources/MandatoryTrue.yang
@@ -0,0 +1,14 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ leaf invalid-interval {
+ type "uint16";
+ units "seconds";
+ description "Interval before a route is declared invalid";
+ config true;
+ mandatory true;
+ status current;
+ reference "RFC 6020";
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/MandatoryWithoutStatementEnd.yang b/src/test/resources/MandatoryWithoutStatementEnd.yang
new file mode 100644
index 0000000..055f556
--- /dev/null
+++ b/src/test/resources/MandatoryWithoutStatementEnd.yang
@@ -0,0 +1,9 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ leaf invalid-interval {
+ type "uint16";
+ mandatory false
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/MaxElementsCardinality.yang b/src/test/resources/MaxElementsCardinality.yang
new file mode 100644
index 0000000..bff2fd7
--- /dev/null
+++ b/src/test/resources/MaxElementsCardinality.yang
@@ -0,0 +1,15 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ leaf-list invalid-interval {
+ type "uint16";
+ units "seconds";
+ max-elements 4;
+ max-elements 6;
+ description "Interval before a route is declared invalid";
+ config true;
+ status current;
+ reference "RFC 6020";
+ }
+}
diff --git a/src/test/resources/MaxElementsInvalidStatement.yang b/src/test/resources/MaxElementsInvalidStatement.yang
new file mode 100644
index 0000000..67cb358
--- /dev/null
+++ b/src/test/resources/MaxElementsInvalidStatement.yang
@@ -0,0 +1,14 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ leaf-list invalid-interval {
+ type "uint16";
+ units "seconds";
+ max-element 3;
+ description "Interval before a route is declared invalid;
+ config true;
+ status current;
+ reference "RFC 6020";
+ }
+}
diff --git a/src/test/resources/MaxElementsUnbounded.yang b/src/test/resources/MaxElementsUnbounded.yang
new file mode 100644
index 0000000..afaca4f
--- /dev/null
+++ b/src/test/resources/MaxElementsUnbounded.yang
@@ -0,0 +1,9 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ leaf-list invalid-interval {
+ type "uint16";
+ max-elements unbounded;
+ }
+}
diff --git a/src/test/resources/MaxElementsWithoutStatementEnd.yang b/src/test/resources/MaxElementsWithoutStatementEnd.yang
new file mode 100644
index 0000000..5973dd0
--- /dev/null
+++ b/src/test/resources/MaxElementsWithoutStatementEnd.yang
@@ -0,0 +1,14 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ leaf-list invalid-interval {
+ type "uint16";
+ units "seconds";
+ max-elements 3
+ description "Interval before a route is declared invalid";
+ config true;
+ status current;
+ reference "RFC 6020";
+ }
+}
diff --git a/src/test/resources/MinElementsInvalidCardinality.yang b/src/test/resources/MinElementsInvalidCardinality.yang
new file mode 100644
index 0000000..18f6019
--- /dev/null
+++ b/src/test/resources/MinElementsInvalidCardinality.yang
@@ -0,0 +1,15 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ leaf-list invalid-interval {
+ type "uint16";
+ units "seconds";
+ min-elements 4;
+ min-elements 6;
+ description "Interval before a route is declared invalid";
+ config true;
+ status current;
+ reference "RFC 6020";
+ }
+}
diff --git a/src/test/resources/MinElementsInvalidKeyword.yang b/src/test/resources/MinElementsInvalidKeyword.yang
new file mode 100644
index 0000000..e634509
--- /dev/null
+++ b/src/test/resources/MinElementsInvalidKeyword.yang
@@ -0,0 +1,14 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ leaf-list invalid-interval {
+ type "uint16";
+ units "seconds";
+ min-element 3;
+ description "Interval before a route is declared invalid";
+ config true;
+ status current;
+ reference "RFC 6020";
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/MinElementsInvalidValue.yang b/src/test/resources/MinElementsInvalidValue.yang
new file mode 100644
index 0000000..a381184
--- /dev/null
+++ b/src/test/resources/MinElementsInvalidValue.yang
@@ -0,0 +1,14 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ leaf-list invalid-interval {
+ type "uint16";
+ units "seconds";
+ min-elements asd;
+ description "Interval before a route is declared invalid";
+ config true;
+ status current;
+ reference "RFC 6020";
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/MinElementsWithoutStatementEnd.yang b/src/test/resources/MinElementsWithoutStatementEnd.yang
new file mode 100644
index 0000000..699a8b8
--- /dev/null
+++ b/src/test/resources/MinElementsWithoutStatementEnd.yang
@@ -0,0 +1,14 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ leaf-list invalid-interval {
+ type "uint16";
+ units "seconds";
+ min-elements 3
+ description "Interval before a route is declared invalid";
+ config true;
+ status current;
+ reference "RFC 6020";
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/ModuleSubStatementConfig.yang b/src/test/resources/ModuleSubStatementConfig.yang
new file mode 100644
index 0000000..49deb3e
--- /dev/null
+++ b/src/test/resources/ModuleSubStatementConfig.yang
@@ -0,0 +1,6 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ config invalid;
+}
\ No newline at end of file
diff --git a/src/test/resources/ModuleSubStatementContainer.yang b/src/test/resources/ModuleSubStatementContainer.yang
new file mode 100644
index 0000000..35a91ad
--- /dev/null
+++ b/src/test/resources/ModuleSubStatementContainer.yang
@@ -0,0 +1,13 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ container valid {
+ leaf invalid-interval {
+ type "uint16";
+ units "seconds";
+ status current;
+ reference "RFC 6020";
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/ModuleSubStatementDescription.yang b/src/test/resources/ModuleSubStatementDescription.yang
new file mode 100644
index 0000000..02643b1
--- /dev/null
+++ b/src/test/resources/ModuleSubStatementDescription.yang
@@ -0,0 +1,6 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ description "Interval before a route is declared invalid";
+}
\ No newline at end of file
diff --git a/src/test/resources/ModuleSubStatementList.yang b/src/test/resources/ModuleSubStatementList.yang
new file mode 100644
index 0000000..baf36e7
--- /dev/null
+++ b/src/test/resources/ModuleSubStatementList.yang
@@ -0,0 +1,14 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ list valid {
+ key "invalid";
+ leaf invalid-interval {
+ type "uint16";
+ units "seconds";
+ status current;
+ reference "RFC 6020";
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/ModuleSubStatementMandatory.yang b/src/test/resources/ModuleSubStatementMandatory.yang
new file mode 100644
index 0000000..8f6e1a1
--- /dev/null
+++ b/src/test/resources/ModuleSubStatementMandatory.yang
@@ -0,0 +1,6 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ mandatory false;
+}
\ No newline at end of file
diff --git a/src/test/resources/ModuleSubStatementReference.yang b/src/test/resources/ModuleSubStatementReference.yang
new file mode 100644
index 0000000..20b2fb6
--- /dev/null
+++ b/src/test/resources/ModuleSubStatementReference.yang
@@ -0,0 +1,6 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ reference "RFC 6020";
+}
\ No newline at end of file
diff --git a/src/test/resources/ModuleSubStatementStatus.yang b/src/test/resources/ModuleSubStatementStatus.yang
new file mode 100644
index 0000000..3739096
--- /dev/null
+++ b/src/test/resources/ModuleSubStatementStatus.yang
@@ -0,0 +1,6 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ status current;
+}
\ No newline at end of file
diff --git a/src/test/resources/ModuleSubStatementUnits.yang b/src/test/resources/ModuleSubStatementUnits.yang
new file mode 100644
index 0000000..d9381ec
--- /dev/null
+++ b/src/test/resources/ModuleSubStatementUnits.yang
@@ -0,0 +1,7 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ type "uint16";
+ units "seconds";
+}
\ No newline at end of file
diff --git a/src/test/resources/MultipleKeyValues.yang b/src/test/resources/MultipleKeyValues.yang
new file mode 100644
index 0000000..a9d25a2
--- /dev/null
+++ b/src/test/resources/MultipleKeyValues.yang
@@ -0,0 +1,20 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ list valid {
+ key "ospf isis";
+ leaf ospf {
+ type "uint16";
+ units "seconds";
+ status current;
+ reference "RFC 6020";
+ }
+ leaf isis {
+ type "uint16";
+ units "seconds";
+ status current;
+ reference "RFC 6020";
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/PresenceDefaultValue.yang b/src/test/resources/PresenceDefaultValue.yang
new file mode 100644
index 0000000..6418e20
--- /dev/null
+++ b/src/test/resources/PresenceDefaultValue.yang
@@ -0,0 +1,13 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ container valid {
+ leaf ospf {
+ type "uint16";
+ units "seconds";
+ status current;
+ reference "RFC 6020";
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/PresenceWithoutStatementEnd.yang b/src/test/resources/PresenceWithoutStatementEnd.yang
new file mode 100644
index 0000000..1427c5f
--- /dev/null
+++ b/src/test/resources/PresenceWithoutStatementEnd.yang
@@ -0,0 +1,14 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ container valid {
+ presence "invalid"
+ leaf invalid-interval {
+ type "uint16";
+ units "seconds";
+ status current;
+ reference "RFC 6020";
+ }
+ }
+}
diff --git a/src/test/resources/ReferenceEmptyStatement.yang b/src/test/resources/ReferenceEmptyStatement.yang
new file mode 100644
index 0000000..ff3525a
--- /dev/null
+++ b/src/test/resources/ReferenceEmptyStatement.yang
@@ -0,0 +1,6 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ reference "";
+}
\ No newline at end of file
diff --git a/src/test/resources/ReferenceStatement.yang b/src/test/resources/ReferenceStatement.yang
new file mode 100644
index 0000000..70349a0
--- /dev/null
+++ b/src/test/resources/ReferenceStatement.yang
@@ -0,0 +1,14 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ leaf invalid-interval {
+ type "uint16";
+ units "seconds";
+ description "Interval before a route is declared invalid";
+ config true;
+ mandatory true;
+ status current;
+ reference "RFC 6020";
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/ReferenceWithoutStatementEnd.yang b/src/test/resources/ReferenceWithoutStatementEnd.yang
new file mode 100644
index 0000000..f2fcf43
--- /dev/null
+++ b/src/test/resources/ReferenceWithoutStatementEnd.yang
@@ -0,0 +1,9 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ leaf invalid-interval {
+ type "uint16";
+ reference "RFC 6020"
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/RevisionSubStatementReference.yang b/src/test/resources/RevisionSubStatementReference.yang
new file mode 100644
index 0000000..d1ada14
--- /dev/null
+++ b/src/test/resources/RevisionSubStatementReference.yang
@@ -0,0 +1,9 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ description "module description";
+ revision 2007-06-09 {
+ reference "revision reference";
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/RevisionSubStatementRevision.yang b/src/test/resources/RevisionSubStatementRevision.yang
new file mode 100644
index 0000000..3d1daa2
--- /dev/null
+++ b/src/test/resources/RevisionSubStatementRevision.yang
@@ -0,0 +1,10 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ description "module description";
+ revision 2007-06-09 {
+ description "revision description";
+ }
+}
+
diff --git a/src/test/resources/StatusInvalidValue.yang b/src/test/resources/StatusInvalidValue.yang
new file mode 100644
index 0000000..253b785
--- /dev/null
+++ b/src/test/resources/StatusInvalidValue.yang
@@ -0,0 +1,9 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ leaf invalid-interval {
+ type "uint16";
+ status invalid;
+ }
+}
diff --git a/src/test/resources/StatusStatementCurrent.yang b/src/test/resources/StatusStatementCurrent.yang
new file mode 100644
index 0000000..dd9a36d
--- /dev/null
+++ b/src/test/resources/StatusStatementCurrent.yang
@@ -0,0 +1,14 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ leaf invalid-interval {
+ type "uint16";
+ units "seconds";
+ description "Interval before a route is declared invalid";
+ config true;
+ mandatory true;
+ status current;
+ reference "RFC 6020";
+ }
+}
diff --git a/src/test/resources/StatusStatementDeprecated.yang b/src/test/resources/StatusStatementDeprecated.yang
new file mode 100644
index 0000000..9a257b1
--- /dev/null
+++ b/src/test/resources/StatusStatementDeprecated.yang
@@ -0,0 +1,9 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ leaf invalid-interval {
+ type "uint16";
+ status deprecated;
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/StatusStatementObsolete.yang b/src/test/resources/StatusStatementObsolete.yang
new file mode 100644
index 0000000..19325ed
--- /dev/null
+++ b/src/test/resources/StatusStatementObsolete.yang
@@ -0,0 +1,9 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ leaf invalid-interval {
+ type "uint16";
+ status obsolete;
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/StatusWithoutStatementEnd.yang b/src/test/resources/StatusWithoutStatementEnd.yang
new file mode 100644
index 0000000..27a8cfa
--- /dev/null
+++ b/src/test/resources/StatusWithoutStatementEnd.yang
@@ -0,0 +1,9 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ leaf invalid-interval {
+ type "uint16";
+ status current
+ }
+}
diff --git a/src/test/resources/UnitsDefaultValue.yang b/src/test/resources/UnitsDefaultValue.yang
new file mode 100644
index 0000000..c71d5ea
--- /dev/null
+++ b/src/test/resources/UnitsDefaultValue.yang
@@ -0,0 +1,8 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ leaf invalid-interval {
+ type "uint16";
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/UnitsStatement.yang b/src/test/resources/UnitsStatement.yang
new file mode 100644
index 0000000..70349a0
--- /dev/null
+++ b/src/test/resources/UnitsStatement.yang
@@ -0,0 +1,14 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ leaf invalid-interval {
+ type "uint16";
+ units "seconds";
+ description "Interval before a route is declared invalid";
+ config true;
+ mandatory true;
+ status current;
+ reference "RFC 6020";
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/UnitsStatementCardinality.yang b/src/test/resources/UnitsStatementCardinality.yang
new file mode 100644
index 0000000..50a2ba0
--- /dev/null
+++ b/src/test/resources/UnitsStatementCardinality.yang
@@ -0,0 +1,10 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ leaf invalid-interval {
+ type "uint16";
+ units "seconds";
+ units "minutes";
+ }
+}
diff --git a/src/test/resources/UnitsStatementOrder.yang b/src/test/resources/UnitsStatementOrder.yang
new file mode 100644
index 0000000..e41e201
--- /dev/null
+++ b/src/test/resources/UnitsStatementOrder.yang
@@ -0,0 +1,14 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ leaf invalid-interval {
+ units "seconds";
+ type "uint16";
+ description "Interval before a route is declared invalid";
+ config true;
+ mandatory true;
+ status current;
+ reference "RFC 6020";
+ }
+}
diff --git a/src/test/resources/UnitsWithoutStatementEnd.yang b/src/test/resources/UnitsWithoutStatementEnd.yang
new file mode 100644
index 0000000..889d7b7
--- /dev/null
+++ b/src/test/resources/UnitsWithoutStatementEnd.yang
@@ -0,0 +1,9 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ leaf invalid-interval {
+ type "uint16";
+ units "seconds"
+ }
+}