Add new tests.

This commit is contained in:
Alexander Arlt
2019-11-01 14:54:47 -05:00
parent 62950a9234
commit 54c5e604e5
9 changed files with 212 additions and 0 deletions
@@ -0,0 +1,3 @@
abstract abstract contract A { constructor() public {} }
// ----
// ParserError: (9-17): Contract expected.
@@ -0,0 +1 @@
abstract contract A { constructor() public {} }
@@ -0,0 +1,3 @@
abstract interface A { }
// ----
// ParserError: (0-8): Only contracts can be abstract.
@@ -0,0 +1,3 @@
abstract library A { }
// ----
// ParserError: (0-8): Only contracts can be abstract.
@@ -0,0 +1,5 @@
contract A {
function a() public;
}
// ----
// TypeError: (0-39): Contract "A" should be marked as abstract.
@@ -0,0 +1,7 @@
abstract contract A {
function a() public;
}
contract B is A {
}
// ----
// TypeError: (49-68): Contract "B" should be marked as abstract.