add missing tests
authorMichael Wallner <mike@php.net>
Thu, 14 Apr 2016 07:48:24 +0000 (09:48 +0200)
committerMichael Wallner <mike@php.net>
Thu, 14 Apr 2016 07:48:24 +0000 (09:48 +0200)
tests/parser/enum/enum001.phpt [new file with mode: 0644]
tests/parser/enum/enum001.psi [new file with mode: 0644]

diff --git a/tests/parser/enum/enum001.phpt b/tests/parser/enum/enum001.phpt
new file mode 100644 (file)
index 0000000..b186de5
--- /dev/null
@@ -0,0 +1,16 @@
+--TEST--
+enum
+--SKIPIF--
+<?php 
+extension_loaded("psi") or die("skip - need ext/psi");
+?>
+--FILE--
+===TEST===
+<?php 
+var_dump(psi_validate(__DIR__."/enum001.psi"));
+?>
+===DONE===
+--EXPECT--
+===TEST===
+bool(true)
+===DONE===
diff --git a/tests/parser/enum/enum001.psi b/tests/parser/enum/enum001.psi
new file mode 100644 (file)
index 0000000..0d37876
--- /dev/null
@@ -0,0 +1,17 @@
+enum a {
+ A,
+ B,
+ C
+}
+
+enum b {
+       FAILURE = -1,
+       SUCCESS = 0
+}
+
+enum c {
+ no = -1,
+ maybe = SUCCESS,
+ yes,
+ sure = yes
+}