mirror of
				https://github.com/ethereum/solidity
				synced 2023-10-03 13:03:40 +00:00 
			
		
		
		
	Add test case for revert() in SMTChecker
This commit is contained in:
		
							parent
							
								
									eac175c08b
								
							
						
					
					
						commit
						8f36408ef9
					
				
							
								
								
									
										19
									
								
								test/libsolidity/smtCheckerTests/control_flow/revert.sol
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								test/libsolidity/smtCheckerTests/control_flow/revert.sol
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,19 @@
 | 
			
		||||
pragma experimental SMTChecker;
 | 
			
		||||
 | 
			
		||||
contract C {
 | 
			
		||||
	function f() pure public {
 | 
			
		||||
		require(false);
 | 
			
		||||
		// This is not reachable.
 | 
			
		||||
		assert(false);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	function g() pure public {
 | 
			
		||||
		revert();
 | 
			
		||||
		// This is not reachable.
 | 
			
		||||
		assert(false);
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
// ----
 | 
			
		||||
// Warning 5740: (211-224): Unreachable code.
 | 
			
		||||
// Warning 6328: (211-224): Assertion violation happens here.
 | 
			
		||||
// Warning 4588: (171-179): Assertion checker does not yet implement this type of function call.
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user