aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTohei Ichikawa <ichikawa.tohei.desu@gmail.com>2025-11-09 22:07:09 -0500
committerTohei Ichikawa <ichikawa.tohei.desu@gmail.com>2025-11-09 22:07:09 -0500
commit6450459008ee02d00b4d9592763ccbd498acadfe (patch)
tree09239211e29d83fa635e3d86839fd260069f88bd
parent411a1638278810f7ac70d80b3e90bb0b9b852c59 (diff)
Convert test case indentation to tabs
-rw-r--r--tests/internal/test_anonymous_globals.odin60
1 files changed, 30 insertions, 30 deletions
diff --git a/tests/internal/test_anonymous_globals.odin b/tests/internal/test_anonymous_globals.odin
index 177f31599..fc214ebde 100644
--- a/tests/internal/test_anonymous_globals.odin
+++ b/tests/internal/test_anonymous_globals.odin
@@ -7,28 +7,28 @@ import "core:testing"
// https://github.com/odin-lang/Odin/pull/5908
@(test)
test_address_of_anonymous_global :: proc(t: ^testing.T) {
- // This loop exists so that we do more computation with stack memory
- // This increases the likelihood of catching a bug where anonymous globals are incorrectly allocated on the stack
- // instead of the data segment
- for _ in 0..<10 {
- testing.expect(t, global_variable.inner.field == 0xDEADBEEF)
- }
+ // This loop exists so that we do more computation with stack memory
+ // This increases the likelihood of catching a bug where anonymous globals are incorrectly allocated on the stack
+ // instead of the data segment
+ for _ in 0..<10 {
+ testing.expect(t, global_variable.inner.field == 0xDEADBEEF)
+ }
}
global_variable := Outer_Struct{
- inner = &Inner_Struct{
- field = 0xDEADBEEF,
- },
+ inner = &Inner_Struct{
+ field = 0xDEADBEEF,
+ },
}
Outer_Struct :: struct{
- inner: ^Inner_Struct,
+ inner: ^Inner_Struct,
- // Must have a second field to prevent the compiler from simplifying the `Outer_Struct` type to `^Inner_Struct`
- // ...I think? In any case, don't remove this field
- _: int,
+ // Must have a second field to prevent the compiler from simplifying the `Outer_Struct` type to `^Inner_Struct`
+ // ...I think? In any case, don't remove this field
+ _: int,
}
Inner_Struct :: struct{
- field: int,
+ field: int,
}
@@ -39,29 +39,29 @@ Inner_Struct :: struct{
// the bug
@(test)
test_address_of_large_anonymous_global :: proc(t: ^testing.T) {
- // This loop exists so that we do more computation with stack memory
- // This increases the likelihood of catching a bug where anonymous globals are incorrectly allocated on the stack
- // instead of the data segment
- for _ in 0..<10 {
- for i in 0..<8 {
- testing.expect(t, global_variable_64.inner.field[i] == i)
- }
- }
+ // This loop exists so that we do more computation with stack memory
+ // This increases the likelihood of catching a bug where anonymous globals are incorrectly allocated on the stack
+ // instead of the data segment
+ for _ in 0..<10 {
+ for i in 0..<8 {
+ testing.expect(t, global_variable_64.inner.field[i] == i)
+ }
+ }
}
#assert(size_of(Inner_Struct_64) == 64)
global_variable_64 := Outer_Struct_64{
- inner = &Inner_Struct_64{
- field = [8]int{0, 1, 2, 3, 4, 5, 6, 7},
- },
+ inner = &Inner_Struct_64{
+ field = [8]int{0, 1, 2, 3, 4, 5, 6, 7},
+ },
}
Outer_Struct_64 :: struct{
- inner: ^Inner_Struct_64,
+ inner: ^Inner_Struct_64,
- // Must have a second field to prevent the compiler from simplifying the `Outer_Struct` type to `^Inner_Struct`
- // ...I think? In any case, don't remove this field
- _: int,
+ // Must have a second field to prevent the compiler from simplifying the `Outer_Struct` type to `^Inner_Struct`
+ // ...I think? In any case, don't remove this field
+ _: int,
}
Inner_Struct_64 :: struct{
- field: [8]int,
+ field: [8]int,
}