handling of unique

Change-Id: Iadd216f2c8ada19a3b3c11a670497d1a493b8237
diff --git a/compiler/base/parser/src/test/resources/UniqueError.yang b/compiler/base/parser/src/test/resources/UniqueError.yang
new file mode 100644
index 0000000..cd15de1
--- /dev/null
+++ b/compiler/base/parser/src/test/resources/UniqueError.yang
@@ -0,0 +1,20 @@
+module TestUnique {
+    yang-version 1;
+    namespace http://huawei.com;
+    prefix Anim;
+    list resources {
+        key "count";
+        leaf count {
+            type int;
+        }
+        unique "animal/mammal/abc";
+        container animal {
+            list mammal {
+                key "abc";
+                leaf abc {
+                    type "String";
+                }
+            }
+        }
+    }
+}
\ No newline at end of file