Refactored parsing of uses and augment statements.
[yangtools.git] / yang / yang-parser-impl / src / test / java / org / opendaylight / yangtools / yang / parser / impl / YangParserNegativeTest.java
index 29092530f54b259df303b1173bb94ff2071b5603..e238fdcbd4555f5a49726035c1fee981b600495c 100644 (file)
@@ -64,7 +64,8 @@ public class YangParserNegativeTest {
                 }
             }
         } catch (YangParseException e) {
-            assertTrue(e.getMessage().contains("Failed to resolve augments in module 'test3'."));
+            assertEquals("Error in module 'test3' at line 10: Error in augment parsing: failed to find augment target",
+                    e.getMessage());
         }
     }
 
@@ -174,7 +175,7 @@ public class YangParserNegativeTest {
                 fail("YangParseException should by thrown");
             }
         } catch (YangParseException e) {
-            String expected = "Error in module 'augment1' at line 11: Can not add 'leaf id' to 'container bar' in module 'augment0': node with same name already declared at line 9";
+            String expected = "Error in module 'augment1' at line 10: Failed to perform augmentation: Error in module 'augment0' at line 8: Can not add 'leaf id' to 'container bar' in module 'augment0': node with same name already declared at line 9";
             assertEquals(expected, e.getMessage());
         }
     }
@@ -190,7 +191,7 @@ public class YangParserNegativeTest {
                 fail("YangParseException should by thrown");
             }
         } catch (YangParseException e) {
-            String expected = "Error in module 'augment2' at line 11: Can not add 'anyxml delta' to node 'choice-ext' in module 'augment0': case with same name already declared at line 18";
+            String expected = "Error in module 'augment0' at line 17: Can not add 'anyxml delta' to node 'choice-ext' in module 'augment0': case with same name already declared at line 18";
             assertEquals(expected, e.getMessage());
         }
     }