Skip to content

Commit 4c7755a

Browse files
Update contract type deprecation warning tests
1 parent 830a029 commit 4c7755a

File tree

9 files changed

+19
-6
lines changed

9 files changed

+19
-6
lines changed

test/libsolidity/smtCheckerTests/deployment/deploy_trusted_addresses.sol

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,5 @@ contract C {
1616
// SMTEngine: all
1717
// SMTExtCalls: trusted
1818
// ----
19+
// Warning 9170: (107-115): Comparison of variables of contract type is deprecated and scheduled for removal in the next breaking version (0.9). Instead, use an explicit cast to address type.
1920
// Info 1391: CHC: 3 verification condition(s) proved safe! Enable the model checker option "show proved safe" to see all of them.

test/libsolidity/smtCheckerTests/deployment/deploy_untrusted_addresses.sol

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@ contract C {
1515
// ====
1616
// SMTEngine: all
1717
// ----
18+
// Warning 9170: (107-115): Comparison of variables of contract type is deprecated and scheduled for removal in the next breaking version (0.9). Instead, use an explicit cast to address type.
1819
// Warning 8729: (70-77): Contract deployment is only supported in the trusted mode for external calls with the CHC engine.
1920
// Warning 8729: (88-95): Contract deployment is only supported in the trusted mode for external calls with the CHC engine.
2021
// Warning 6328: (100-116): CHC: Assertion violation happens here.\nCounterexample:\n\nd1 = 0\nd2 = 0\n\nTransaction trace:\nC.constructor()\nC.f()
21-
// Warning 6328: (163-199): CHC: Assertion violation happens here.\nCounterexample:\n\nd1 = 21238\nd2 = 21238\n\nTransaction trace:\nC.constructor()\nC.f()
22-
// Warning 6328: (246-282): CHC: Assertion violation happens here.\nCounterexample:\n\nd1 = 21238\nd2 = 21238\n\nTransaction trace:\nC.constructor()\nC.f()
22+
// Warning 6328: (163-199): CHC: Assertion violation happens here.\nCounterexample:\n\nd1 = 11797\nd2 = 11797\n\nTransaction trace:\nC.constructor()\nC.f()
23+
// Warning 6328: (246-282): CHC: Assertion violation happens here.\nCounterexample:\n\nd1 = 8855\nd2 = 8855\n\nTransaction trace:\nC.constructor()\nC.f()

test/libsolidity/smtCheckerTests/functions/getters/contract.sol

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,6 @@ contract C {
1212
// ====
1313
// SMTEngine: all
1414
// ----
15-
// Warning 6328: (123-158): CHC: Assertion violation happens here.
15+
// Warning 9170: (97-103): Comparison of variables of contract type is deprecated and scheduled for removal in the next breaking version (0.9). Instead, use an explicit cast to address type.
16+
// Warning 6328: (123-158): CHC: Assertion violation happens here.\nCounterexample:\nd = 0\ne = 0\n\nTransaction trace:\nC.constructor()\nState: d = 0\nC.f()
1617
// Info 1391: CHC: 1 verification condition(s) proved safe! Enable the model checker option "show proved safe" to see all of them.

test/libsolidity/smtCheckerTests/functions/getters/struct_4.sol

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ contract C {
1818
// ====
1919
// SMTEngine: all
2020
// ----
21+
// Warning 9170: (206-214): Comparison of variables of contract type is deprecated and scheduled for removal in the next breaking version (0.9). Instead, use an explicit cast to address type.
2122
// Warning 2072: (146-183): Unused local variable.
2223
// Warning 8364: (187-193): Assertion checker does not yet implement type function () view external returns (contract D,function () external returns (uint256))
23-
// Warning 6328: (234-269): CHC: Assertion violation happens here.
24+
// Warning 6328: (234-269): CHC: Assertion violation happens here.\nCounterexample:\ns = {d: 0, f: 0}\nd = 0\nf = 0\n\nTransaction trace:\nC.constructor()\nState: s = {d: 0, f: 0}\nC.test()
2425
// Info 1391: CHC: 1 verification condition(s) proved safe! Enable the model checker option "show proved safe" to see all of them.

test/libsolidity/smtCheckerTests/types/contract.sol

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@ contract C
88
// SMTEngine: all
99
// SMTIgnoreCex: yes
1010
// ----
11-
// Warning 6328: (51-65): CHC: Assertion violation happens here.
11+
// Warning 9170: (58-64): Comparison of variables of contract type is deprecated and scheduled for removal in the next breaking version (0.9). Instead, use an explicit cast to address type.
12+
// Warning 6328: (51-65): CHC: Assertion violation happens here.\nCounterexample:\n\nc = 0\nd = 1\n\nTransaction trace:\nC.constructor()\nC.f(0, 1)

test/libsolidity/smtCheckerTests/types/contract_2.sol

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,5 @@ contract C
1313
// SMTEngine: all
1414
// SMTIgnoreCex: yes
1515
// ----
16-
// Warning 6328: (76-90): CHC: Assertion violation happens here.
16+
// Warning 9170: (83-89): Comparison of variables of contract type is deprecated and scheduled for removal in the next breaking version (0.9). Instead, use an explicit cast to address type.
17+
// Warning 6328: (76-90): CHC: Assertion violation happens here.\nCounterexample:\n\nc = 0\nd = 1\n\nTransaction trace:\nC.constructor()\nC.f(0, 1)

test/libsolidity/smtCheckerTests/types/contract_3.sol

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,7 @@ contract C
99
// ====
1010
// SMTEngine: all
1111
// ----
12+
// Warning 9170: (64-70): Comparison of variables of contract type is deprecated and scheduled for removal in the next breaking version (0.9). Instead, use an explicit cast to address type.
13+
// Warning 9170: (83-89): Comparison of variables of contract type is deprecated and scheduled for removal in the next breaking version (0.9). Instead, use an explicit cast to address type.
14+
// Warning 9170: (101-107): Comparison of variables of contract type is deprecated and scheduled for removal in the next breaking version (0.9). Instead, use an explicit cast to address type.
1215
// Info 1391: CHC: 1 verification condition(s) proved safe! Enable the model checker option "show proved safe" to see all of them.

test/libsolidity/smtCheckerTests/types/contract_address_conversion_2.sol

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ contract C
1010
// ====
1111
// SMTEngine: all
1212
// ----
13+
// Warning 9170: (121-127): Comparison of variables of contract type is deprecated and scheduled for removal in the next breaking version (0.9). Instead, use an explicit cast to address type.
1314
// Info 1391: CHC: 2 verification condition(s) proved safe! Enable the model checker option "show proved safe" to see all of them.

test/libsolidity/syntaxTests/conversion/implicit_conversion_of_super_in_comparison.sol

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@ contract C {
2121
// ----
2222
// TypeError 2271: (144-157): Built-in binary operator != cannot be applied to types type(contract super C) and contract C.
2323
// TypeError 2271: (167-180): Built-in binary operator != cannot be applied to types contract C and type(contract super C).
24+
// Warning 9170: (167-180): Comparison of variables of contract type is deprecated and scheduled for removal in the next breaking version (0.9). Instead, use an explicit cast to address type.
2425
// TypeError 2271: (254-264): Built-in binary operator != cannot be applied to types type(contract super C) and contract C.
2526
// TypeError 2271: (274-284): Built-in binary operator != cannot be applied to types contract C and type(contract super C).
27+
// Warning 9170: (274-284): Comparison of variables of contract type is deprecated and scheduled for removal in the next breaking version (0.9). Instead, use an explicit cast to address type.
2628
// TypeError 2271: (349-359): Built-in binary operator != cannot be applied to types type(contract super C) and contract D.
2729
// TypeError 2271: (369-379): Built-in binary operator != cannot be applied to types contract D and type(contract super C).
30+
// Warning 9170: (369-379): Comparison of variables of contract type is deprecated and scheduled for removal in the next breaking version (0.9). Instead, use an explicit cast to address type.

0 commit comments

Comments
 (0)