diff options
author | 2024-09-26 19:23:41 +0000 | |
---|---|---|
committer | 2024-09-26 19:23:41 +0000 | |
commit | f3e2d36d6455e6d16aba833bdf64806377c8178f (patch) | |
tree | 8a1e87f349205e8073b72df6e5349c553db80a17 /vendor/codeberg.org/gruf/go-bitutil/test.tpl | |
parent | [chore] Fix some contrast issues in themes; performance tweaks (#3358) (diff) | |
download | gotosocial-f3e2d36d6455e6d16aba833bdf64806377c8178f.tar.xz |
[chore] update go-sched pkg (#3357)
* update go-sched to v1.2.4 which removes some now unused dependencies
* whoops, remove test output
Diffstat (limited to 'vendor/codeberg.org/gruf/go-bitutil/test.tpl')
-rw-r--r-- | vendor/codeberg.org/gruf/go-bitutil/test.tpl | 60 |
1 files changed, 0 insertions, 60 deletions
diff --git a/vendor/codeberg.org/gruf/go-bitutil/test.tpl b/vendor/codeberg.org/gruf/go-bitutil/test.tpl deleted file mode 100644 index 4e659d81f..000000000 --- a/vendor/codeberg.org/gruf/go-bitutil/test.tpl +++ /dev/null @@ -1,60 +0,0 @@ -package atomics_test - -import ( - "atomic" - "unsafe" - "testing" - - "codeberg.org/gruf/go-atomics" -) - -func Test{{ .Name }}StoreLoad(t *testing.T) { - for _, test := range {{ .Name }}Tests { - val := atomics.New{{ .Name }}() - - val.Store(test.V1) - - if !({{ call .Compare "val.Load()" "test.V1" }}) { - t.Fatalf("failed testing .Store and .Load: expect=%v actual=%v", val.Load(), test.V1) - } - - val.Store(test.V2) - - if !({{ call .Compare "val.Load()" "test.V2" }}) { - t.Fatalf("failed testing .Store and .Load: expect=%v actual=%v", val.Load(), test.V2) - } - } -} - -func Test{{ .Name }}CAS(t *testing.T) { - for _, test := range {{ .Name }}Tests { - val := atomics.New{{ .Name }}() - - val.Store(test.V1) - - if val.CAS(test.V2, test.V1) { - t.Fatalf("failed testing negative .CAS: test=%+v state=%v", test, val.Load()) - } - - if !val.CAS(test.V1, test.V2) { - t.Fatalf("failed testing positive .CAS: test=%+v state=%v", test, val.Load()) - } - } -} - -func Test{{ .Name }}Swap(t *testing.T) { - for _, test := range {{ .Name }}Tests { - val := atomics.New{{ .Name }}() - - val.Store(test.V1) - - if !({{ call .Compare "val.Swap(test.V2)" "test.V1" }}) { - t.Fatal("failed testing .Swap") - } - - if !({{ call .Compare "val.Swap(test.V1)" "test.V2" }}) { - t.Fatal("failed testing .Swap") - } - } -} - |