Add logic param and integer bad syntax tests
authorKamil Rakoczy <krakoczy@antmicro.com>
Mon, 6 Jul 2020 07:05:34 +0000 (09:05 +0200)
committerKamil Rakoczy <krakoczy@antmicro.com>
Mon, 6 Jul 2020 07:18:48 +0000 (09:18 +0200)
Signed-off-by: Kamil Rakoczy <krakoczy@antmicro.com>
tests/various/integer_range_bad_syntax.ys [new file with mode: 0644]
tests/various/integer_real_bad_syntax.ys [new file with mode: 0644]
tests/various/logic_param_simple.ys [new file with mode: 0644]

diff --git a/tests/various/integer_range_bad_syntax.ys b/tests/various/integer_range_bad_syntax.ys
new file mode 100644 (file)
index 0000000..4f42721
--- /dev/null
@@ -0,0 +1,6 @@
+logger -expect error "syntax error, unexpected" 1
+read_verilog -sv <<EOT
+module test_integer_range();
+parameter integer [31:0] a = 0;
+endmodule
+EOT
diff --git a/tests/various/integer_real_bad_syntax.ys b/tests/various/integer_real_bad_syntax.ys
new file mode 100644 (file)
index 0000000..942d8de
--- /dev/null
@@ -0,0 +1,6 @@
+logger -expect error "syntax error, unexpected TOK_REAL" 1
+read_verilog -sv <<EOT
+module test_integer_real();
+parameter integer real a = 0;
+endmodule
+EOT
diff --git a/tests/various/logic_param_simple.ys b/tests/various/logic_param_simple.ys
new file mode 100644 (file)
index 0000000..9685640
--- /dev/null
@@ -0,0 +1,9 @@
+read_verilog -sv <<EOT
+module test_logic_param();
+parameter logic                 a = 0;
+parameter logic [31:0]          e = 0;
+parameter logic signed          b = 0;
+parameter logic unsigned        c = 0;
+parameter logic unsigned [31:0] d = 0;
+endmodule
+EOT