tests: update/extend task argument tests
authorEddie Hung <eddie@fpgeh.com>
Wed, 13 May 2020 17:11:45 +0000 (10:11 -0700)
committerEddie Hung <eddie@fpgeh.com>
Wed, 13 May 2020 17:11:45 +0000 (10:11 -0700)
tests/verilog/bug2042-sv.ys [new file with mode: 0644]
tests/verilog/bug2042.ys

diff --git a/tests/verilog/bug2042-sv.ys b/tests/verilog/bug2042-sv.ys
new file mode 100644 (file)
index 0000000..9a0d419
--- /dev/null
@@ -0,0 +1,34 @@
+read_verilog -sv <<EOT
+module Task_Test_Top
+(
+input a,
+output b
+);
+
+    task SomeTaskName(a);
+       b = ~a;
+    endtask
+
+    always @*
+        SomeTaskName(a);
+
+    assert property (b == ~a);
+
+endmodule
+EOT
+proc
+sat -verify -prove-asserts
+
+
+design -reset
+logger -expect error "syntax error, unexpected TOK_ENDTASK, expecting ';'" 1
+read_verilog -sv <<EOT
+module Task_Test_Top
+(
+);
+
+    task SomeTaskName(a)
+    endtask
+
+endmodule
+EOT
index 009e2c20c7c422471659c0914d5916956851a405..f9d8e2837324d25bb295e77ccb0aae94a4d79cc7 100644 (file)
@@ -1,4 +1,4 @@
-logger -expect error "Non-ANSI style task/function arguments not currently supported" 1
+logger -expect error "task/function argument direction missing" 1
 read_verilog <<EOT
 module Task_Test_Top
 (
@@ -9,4 +9,3 @@ module Task_Test_Top
 
 endmodule
 EOT
-