Migrated all YANG testfiles counting 50 lines or less.
JIRA: YANGTOOLS-1506
Change-Id: Ib274b98ff58e79f2c3a84d222c17c9b2f21b3d99
Signed-off-by: matus.matok <matus.matok@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
@BeforeAll
public static void beforeAll() {
- CONTEXT = YangParserTestUtils.parseYangResourceDirectory("/YT1433");
+ CONTEXT = YangParserTestUtils.parseYang("""
+ module foo {
+ namespace foo;
+ prefix foo;
+
+ container foo;
+
+ augment /foo {
+ container bar;
+ }
+
+ augment /foo/bar {
+ container baz;
+ }
+ }""", """
+ module bar {
+ namespace bar;
+ prefix bar;
+
+ choice foo;
+
+ augment /foo {
+ container bar;
+ }
+
+ augment /foo/bar/bar {
+ container baz;
+ }
+ }""");
}
@Test
@BeforeAll
public static void beforeAll() {
- CONTEXT = YangParserTestUtils.parseYangResourceDirectory("/YT1392");
+ CONTEXT = YangParserTestUtils.parseYang("""
+ module test {
+ namespace test;
+ prefix test;
+
+ container container-1 {
+ container container-2 {
+ container container-3 {
+ container payload-container {
+ leaf payload-leaf {
+ type string;
+ }
+ }
+ }
+ }
+ }
+
+ choice choice-node {
+ container container-in-case;
+ }
+
+ list list-1 {
+ key list-1-key;
+ leaf list-1-key {
+ type string;
+ }
+ container container-1;
+ }
+
+ leaf-list list-list {
+ type string;
+ }
+ }""", """
+ module augment {
+ namespace augment-namespace;
+ prefix aug;
+
+ import test {
+ prefix test;
+ }
+
+ augment /test:container-1 {
+ container augmented-container {
+ container container-2;
+ }
+ }
+ }""");
}
@Test
+++ /dev/null
-module augment {
- namespace augment-namespace;
- prefix aug;
-
- import test {
- prefix test;
- }
-
- augment /test:container-1 {
- container augmented-container {
- container container-2;
- }
- }
-}
+++ /dev/null
-module test {
- namespace test;
- prefix test;
-
- container container-1 {
- container container-2 {
- container container-3 {
- container payload-container {
- leaf payload-leaf {
- type string;
- }
- }
- }
- }
- }
-
- choice choice-node {
- container container-in-case;
- }
-
- list list-1 {
- key list-1-key;
-
- leaf list-1-key {
- type string;
- }
-
- container container-1;
- }
-
- leaf-list list-list {
- type string;
- }
-}
+++ /dev/null
-module bar {
- namespace bar;
- prefix bar;
-
- choice foo;
-
- augment /foo {
- container bar;
- }
-
- augment /foo/bar/bar {
- container baz;
- }
-}
+++ /dev/null
-module foo {
- namespace foo;
- prefix foo;
-
- container foo;
-
- augment /foo {
- container bar;
- }
-
- augment /foo/bar {
- container baz;
- }
-}