EIP-145: Add more test cases

This commit is contained in:
Paweł Bylica 2018-01-31 17:51:59 +01:00 committed by GitHub
parent ea084caabd
commit 49e86ff026
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 28 additions and 0 deletions

View File

@ -151,6 +151,13 @@ The newly introduced instructions have no effect on bytecode created in the past
---
0x0000000000000000000000000000000000000000000000000000000000000000
```
11. ```
PUSH 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
PUSH 0x01
SHL
---
0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe
```
### `SHR` (logical shift right)
@ -326,6 +333,27 @@ The newly introduced instructions have no effect on bytecode created in the past
---
0x000000000000000000000000000000000000000000000000000000000000007f
```
14. ```
PUSH 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
PUSH 0xfe
SAR
---
0x0000000000000000000000000000000000000000000000000000000000000001
```
15. ```
PUSH 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
PUSH 0xff
SAR
---
0x0000000000000000000000000000000000000000000000000000000000000000
```
16. ```
PUSH 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
PUSH 0x100
SAR
---
0x0000000000000000000000000000000000000000000000000000000000000000
```
## Implementation