Skip to content

Commit e7f0057

Browse files
serkonda7Copilot
andcommitted
minor unrelated test changes
Co-authored-by: Copilot <copilot@github.com>
1 parent 9c28205 commit e7f0057

4 files changed

Lines changed: 14 additions & 15 deletions

File tree

.github/workflows/ci.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,16 +51,17 @@ jobs:
5151
bait test -b c tests/array
5252
bait test -b c tests/auto_str
5353
bait test -b c tests/for/loop_test.bt
54+
bait test -b c tests/for/for_in_test.bt
5455
bait test -b c tests/int/promotion_test.bt
55-
bait test -b c tests/other/bitwise_test.bt
56+
# bait test -b c tests/int/bitwise_test.bt
5657
- name: Run lib tests
5758
run: |
5859
# bait test -b c lib/bait
5960
bait test -b c lib/builtin
6061
# bait test -b c lib/cli
6162
bait test -b c lib/encoding
6263
bait test -b c lib/hash
63-
# bait test -b c lib/os
64+
bait test -b c lib/os
6465
bait test -b c lib/strings
6566
# - name: Run tool tests
6667
# run: bait test cli/tools

tests/for/labels_test.bt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// SPDX-FileCopyrightText: Lukas Neubert <lukas.neubert@proton.me>
1+
// SPDX-FileCopyrightText: Lukas Neubert
22
// SPDX-License-Identifier: MIT
33

44
fun test_labelled_break_and_continue() {

tests/int/bitwise_test.bt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// SPDX-FileCopyrightText: Lukas Neubert <lukas.neubert@proton.me>
1+
// SPDX-FileCopyrightText: Lukas Neubert
22
// SPDX-License-Identifier: MIT
33

44
fun test_bitwise_operators() {
@@ -19,3 +19,12 @@ fun test_bitwise_u32() {
1919
b := 0b1110110110111000100000110010000 as u32 // 1994146192
2020
assert a >> 1 == b
2121
}
22+
23+
// Verify bitwise not on u32 stays within u32 bounds.
24+
fun test_unsigned_not() {
25+
zero := 0 as u32
26+
one := 1 as u32
27+
28+
assert ~zero == MAX_U32
29+
assert ~one == (MAX_U32 - 1)
30+
}

tests/other/bitwise_test.bt

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)