Add source locations to syntax test expectations.

This commit is contained in:
Daniel Kirchner
2018-04-10 14:08:22 +02:00
parent 2bc4ec31e2
commit f03695731b
55 changed files with 216 additions and 108 deletions
@@ -4,4 +4,4 @@ contract Base {
contract Derived is Base(2) { }
contract Derived2 is Base(), Derived() { }
// ----
// Warning: Wrong argument count for constructor call: 0 arguments given but expected 1.
// Warning: (101-107): Wrong argument count for constructor call: 0 arguments given but expected 1.
@@ -6,4 +6,4 @@ contract Base {
contract Derived is Base(2) { }
contract Derived2 is Base(), Derived() { }
// ----
// TypeError: Wrong argument count for constructor call: 0 arguments given but expected 1.
// TypeError: (132-138): Wrong argument count for constructor call: 0 arguments given but expected 1.
@@ -6,4 +6,4 @@ contract Derived is Base, Base1 {
constructor(uint i) Base(i) public {}
}
// ----
// Warning: Base constructor arguments given twice.
// Warning: (138-145): Base constructor arguments given twice.
@@ -1,4 +1,4 @@
contract A { constructor() public { } }
contract B is A { constructor() A public { } }
// ----
// Warning: Modifier-style base constructor call without arguments.
// Warning: (72-73): Modifier-style base constructor call without arguments.
@@ -2,4 +2,4 @@ contract A { constructor(uint) public { } }
contract B is A(2) { constructor() public { } }
contract C is B { constructor() A(3) public { } }
// ----
// Warning: Base constructor arguments given twice.
// Warning: (125-129): Base constructor arguments given twice.
@@ -4,4 +4,4 @@ contract A { constructor(uint) public { } }
contract B is A(2) { constructor() public { } }
contract C is B { constructor() A(3) public { } }
// ----
// DeclarationError: Base constructor arguments given twice.
// DeclarationError: (156-160): Base constructor arguments given twice.
@@ -1,4 +1,4 @@
contract A { constructor(uint) public { } }
contract B is A(2) { constructor() A(3) public { } }
// ----
// Warning: Base constructor arguments given twice.
// Warning: (79-83): Base constructor arguments given twice.
@@ -3,4 +3,4 @@ pragma experimental "v0.5.0";
contract A { constructor(uint) public { } }
contract B is A(2) { constructor() A(3) public { } }
// ----
// DeclarationError: Base constructor arguments given twice.
// DeclarationError: (110-114): Base constructor arguments given twice.
@@ -3,5 +3,5 @@ contract A is C(2) {}
contract B is C(2) {}
contract D is A, B { constructor() C(3) public {} }
// ----
// Warning: Base constructor arguments given twice.
// Warning: Base constructor arguments given twice.
// Warning: (122-126): Base constructor arguments given twice.
// Warning: (122-126): Base constructor arguments given twice.
@@ -3,4 +3,4 @@ contract A is C(2) {}
contract B is C(2) {}
contract D is A, B {}
// ----
// Warning: Base constructor arguments given twice.
// Warning: (87-108): Base constructor arguments given twice.
@@ -3,4 +3,4 @@ contract A is C { constructor() C(2) public {} }
contract B is C { constructor() C(2) public {} }
contract D is A, B { }
// ----
// Warning: Base constructor arguments given twice.
// Warning: (141-163): Base constructor arguments given twice.
@@ -6,5 +6,5 @@ contract Derived2 is Base {
constructor() Base(2) public { }
}
// ----
// TypeError: Wrong argument count for constructor call: 1 arguments given but expected 2.
// TypeError: Wrong argument count for modifier invocation: 1 arguments given but expected 2.
// TypeError: (74-81): Wrong argument count for constructor call: 1 arguments given but expected 2.
// TypeError: (130-137): Wrong argument count for modifier invocation: 1 arguments given but expected 2.