Improved modulo tests

This commit is contained in:
Eduard Urbach 2024-07-25 12:21:10 +02:00
parent 60b8ff1308
commit b8900b518a
Signed by: akyoto
GPG Key ID: C874F672B1AF20C0
2 changed files with 17 additions and 9 deletions

View File

@ -147,16 +147,15 @@ This is what generates expressions from tokens.
### Operators ### Operators
- [x] `=` - [x] `=`, `:=`
- [x] `+`, `-`, `*`, `/` - [x] `+`, `-`, `*`, `/`, `%`
- [x] `+=`, `-=`, `*=`, `/=` - [x] `+=`, `-=`, `*=`, `/=`, `%=`
- [x] `==`, `!=`, `<`, `<=`, `>`, `>=`
- [x] `&&`, `||`
- [ ] `%`
- [ ] `<<`, `>>`
- [ ] `<<=`, `>>=`
- [ ] `&`, `|`, `^` - [ ] `&`, `|`, `^`
- [ ] `&=`, `|=`, `^=` - [ ] `&=`, `|=`, `^=`
- [ ] `<<`, `>>`
- [ ] `<<=`, `>>=`
- [x] `==`, `!=`, `<`, `<=`, `>`, `>=`
- [x] `&&`, `||`
### Architecture ### Architecture

View File

@ -29,7 +29,16 @@ main() {
sys.exit(1) sys.exit(1)
} }
if 256 % 10 != 6 { x := 256
x %= 100
if x != 56 {
sys.exit(1)
}
x %= 10
if x != 6 {
sys.exit(1) sys.exit(1)
} }