This change adds 4 test cases to reproduce:
- Deviation of a case node with case statement
- Deviation of a case node without case statement
- Deviation of an augmented case node with case statement
- Deviation of an augmented case node without case statement
The only test case fails is the last one (deviation of an augmented
case node without case statement). There is another way to depreduce
the root cause, which is to use 'augment' instead of deviate.
The problem is that the implicit case statement does not trigger
onStatementAdded() and hence it does not get registered in the
namespace.
Fixing this issue changes behaviour in testDuplicityInAugmentTarget2(),
i.e. the schema tree overlap previously reported through
SchemaTreeIndexingException (when we are already building effective
view) gets flagged earlier with a SourceException, pointing to both the
place where the conflict occurs and which source statement is causing
it.
JIRA: YANGTOOLS-1408
Change-Id: I7c26399b07aaa142b5ab8191dab97e738118a14a
Signed-off-by: Sangwook Ha <sangwook.ha@verizon.com>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
710d9e5c81cde651ad0c1093fe93ab9e6f899e1e)