mirror of
				https://github.com/ethereum/solidity
				synced 2023-10-03 13:03:40 +00:00 
			
		
		
		
	[SMTChecker] updated tests
This commit is contained in:
		
							parent
							
								
									41fc59f00f
								
							
						
					
					
						commit
						9e81c81560
					
				| @ -0,0 +1,14 @@ | ||||
| pragma experimental SMTChecker; | ||||
| 
 | ||||
| contract C { | ||||
| 	string x; | ||||
| 
 | ||||
| 	function s() public { | ||||
| 		x = "abc"; | ||||
| 		bytes(x).push("a"); | ||||
| 		assert(bytes(x).length == 4); // should hold | ||||
| 		assert(bytes(x).length == 3); // should fail | ||||
| 	} | ||||
| } | ||||
| // ---- | ||||
| // Warning 6328: (165-193): CHC: Assertion violation happens here.\nCounterexample:\nx = [97, 98, 99, 97]\n\nTransaction trace:\nC.constructor()\nState: x = []\nC.s() | ||||
| @ -0,0 +1,14 @@ | ||||
| pragma experimental SMTChecker; | ||||
| 
 | ||||
| contract C { | ||||
| 	string x; | ||||
| 
 | ||||
| 	function s() public { | ||||
| 		x = "abc"; | ||||
| 		((bytes(((x))))).push("a"); | ||||
| 		assert(bytes(x).length == 4); // should hold | ||||
| 		assert(bytes(x).length == 3); // should fail | ||||
| 	} | ||||
| } | ||||
| // ---- | ||||
| // Warning 6328: (173-201): CHC: Assertion violation happens here.\nCounterexample:\nx = [97, 98, 99, 97]\n\nTransaction trace:\nC.constructor()\nState: x = []\nC.s() | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user