Skip to content

Commit

Permalink
Int8/16/32/64 documentation and unit tests (#475)
Browse files Browse the repository at this point in the history
Improve `Int8.mo`, `Int16.mo`, `Int32.mo`, and `Int64.mo`:
* Documentation
* Unit tests
* Related to: #473

Possible improvements for Int8/16/32/64 (#476):
* Minimum value and maximum value constants are missing.
* `bitnot()` has a superfluous second argument: `bitnot(x, y)` should be `bitnot(x)`.
* Inconsistent naming of functions, e.g. `bitrotLeft` (instead of `bitRotLeft`).
* Inconsistent type of second argument in bit operations: `bitshiftLeft` uses `Int64` but  `bittest` uses `Nat`.
  • Loading branch information
luc-blaeser committed Jan 5, 2023
1 parent 98c96a5 commit 4f8d37b
Show file tree
Hide file tree
Showing 8 changed files with 10,787 additions and 126 deletions.
426 changes: 395 additions & 31 deletions src/Int16.mo

Large diffs are not rendered by default.

424 changes: 394 additions & 30 deletions src/Int32.mo

Large diffs are not rendered by default.

424 changes: 394 additions & 30 deletions src/Int64.mo

Large diffs are not rendered by default.

424 changes: 394 additions & 30 deletions src/Int8.mo

Large diffs are not rendered by default.

2,303 changes: 2,303 additions & 0 deletions test/int16Test.mo

Large diffs are not rendered by default.

2,303 changes: 2,303 additions & 0 deletions test/int32Test.mo

Large diffs are not rendered by default.

2,302 changes: 2,302 additions & 0 deletions test/int64Test.mo

Large diffs are not rendered by default.

2,307 changes: 2,302 additions & 5 deletions test/int8Test.mo

Large diffs are not rendered by default.

0 comments on commit 4f8d37b

Please sign in to comment.