mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
More semantic tests.
This commit is contained in:
parent
c3e13b6733
commit
41710acbca
@ -0,0 +1,9 @@
|
|||||||
|
contract C {
|
||||||
|
uint constant x = 1 ether + 1 gwei + 1 wei;
|
||||||
|
|
||||||
|
function f() public view returns(uint) { return x; }
|
||||||
|
}
|
||||||
|
// ====
|
||||||
|
// compileViaYul: also
|
||||||
|
// ----
|
||||||
|
// f() -> 1000000001000000001
|
9
test/libsolidity/semanticTests/literals/ether.sol
Normal file
9
test/libsolidity/semanticTests/literals/ether.sol
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
contract C {
|
||||||
|
uint constant x = 1 ether;
|
||||||
|
|
||||||
|
function f() public view returns(uint) { return x; }
|
||||||
|
}
|
||||||
|
// ====
|
||||||
|
// compileViaYul: also
|
||||||
|
// ----
|
||||||
|
// f() -> 1000000000000000000
|
9
test/libsolidity/semanticTests/literals/wei.sol
Normal file
9
test/libsolidity/semanticTests/literals/wei.sol
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
contract C {
|
||||||
|
uint constant x = 1 wei;
|
||||||
|
|
||||||
|
function f() public view returns(uint) { return x; }
|
||||||
|
}
|
||||||
|
// ====
|
||||||
|
// compileViaYul: also
|
||||||
|
// ----
|
||||||
|
// f() -> 1
|
Loading…
Reference in New Issue
Block a user