raising the head after a three-weeks refactoring
[m6w6/ext-psi] / tests / parser / validate001.phpt
index 7a0a8628b03c8a265a3e8ac8c90324b77ae1d859..1f6113aa0f7fc2b638114d7bc45989c9695bf419 100644 (file)
@@ -7,6 +7,7 @@ extension_loaded("psi") or die("skip - need ext/psi");
 --FILE--
 ===TEST===
 <?php 
+
 function validate($check, $psi) {
        $file = __DIR__."/001.psi";
        file_put_contents($file, $psi);
@@ -20,7 +21,7 @@ validate(false, "typedef void foo;");
 validate(true, "typedef void *bar;");
 validate(false, "typedef long int;");
 validate(true, "typedef long foo;");
-validate(false, "typedef struct foo bar;");
+validate(true, "typedef struct foo bar;");
 validate(true, "typedef struct {int a;} foo;");
 validate(false, "struct a; \ntypedef struct a a_t;");
 validate(true, "struct a::(8,8); \ntypedef struct a a_t;");
@@ -85,15 +86,15 @@ validate(true, "typedef int bar(int baz); \ntypedef int *(*foo)(bar bar);");
 --EXPECTF--
 ===TEST===
 
-Warning: PSI syntax error: Unexpected token ';' in %s001.psi on line 1
-
-Warning: PSI syntax error: Unexpected token 'int' in %s001.psi on line 1
+Warning: PSI syntax error: Unexpected token ';' at pos 17 in %s001.psi on line 1
 
-Warning: Type 'bar' cannot be aliased to struct 'foo' in %s001.psi on line 1
+Warning: PSI syntax error: Unexpected token 'int' at pos 14 in %s001.psi on line 1
 
 Warning: Cannot compute size of empty struct 'a' in %s001.psi on line 1
 
 Warning: Unknown variable 'X' in numeric expression in %s001.psi on line 4
 
-Warning: PSI syntax error: Unexpected token '(' in %s001.psi on line 1
+Warning: PSI syntax error: Unexpected token '(' at pos 26 in %s001.psi on line 1
+
+Warning: PSI syntax error: Unexpected token '(' at pos 32 in %s001.psi on line 1
 ===DONE===