# HG changeset patch # User Sam # Date 1683639589 -25200 # Node ID 9cfd59c93ae80c532520e6046dd7d2d760e9d94b # Parent d7c61e6580ea58ceec4da3aa08072223cbbc7b47 fix: tests diff -r d7c61e6580ea -r 9cfd59c93ae8 tests/test_audio.nim --- a/tests/test_audio.nim Tue May 09 19:52:33 2023 +0700 +++ b/tests/test_audio.nim Tue May 09 20:39:49 2023 +0700 @@ -62,7 +62,7 @@ proc test3() = var song: SoundData - var f = open("tests/audiotest.PCM.s16le.48000.2") + var f = open("./tests/audiotest.PCM.s16le.48000.2") var readLen = 999 while readLen > 0: var sample: Sample @@ -85,6 +85,5 @@ mixer[].stop() test2() mixer[].stop() - while true: - test3() - mixer[].stop() + # test3() # only run this manually, not in automated tests + # mixer[].stop() diff -r d7c61e6580ea -r 9cfd59c93ae8 tests/test_matrix.nim --- a/tests/test_matrix.nim Tue May 09 19:52:33 2023 +0700 +++ b/tests/test_matrix.nim Tue May 09 20:39:49 2023 +0700 @@ -1,8 +1,7 @@ import random import math -import semicongine/math/vector -import semicongine/math/matrix +import semicongine proc echoInfo(v: TVec) = @@ -33,52 +32,52 @@ template withAllIntegerMats(stuff: untyped) = - stuff(TMat22[int32]) + stuff(TMat2[int32]) stuff(TMat23[int32]) stuff(TMat32[int32]) - stuff(TMat33[int32]) + stuff(TMat3[int32]) stuff(TMat34[int32]) stuff(TMat43[int32]) - stuff(TMat44[int32]) - stuff(TMat22[int64]) + stuff(TMat4[int32]) + stuff(TMat2[int64]) stuff(TMat23[int64]) stuff(TMat32[int64]) - stuff(TMat33[int64]) + stuff(TMat3[int64]) stuff(TMat34[int64]) stuff(TMat43[int64]) - stuff(TMat44[int64]) + stuff(TMat4[int64]) template withAllFloatMats(stuff: untyped) = - stuff(TMat22[float32]) + stuff(TMat2[float32]) stuff(TMat23[float32]) stuff(TMat32[float32]) - stuff(TMat33[float32]) + stuff(TMat3[float32]) stuff(TMat34[float32]) stuff(TMat43[float32]) - stuff(TMat44[float32]) - stuff(TMat22[float64]) + stuff(TMat4[float32]) + stuff(TMat2[float64]) stuff(TMat23[float64]) stuff(TMat32[float64]) - stuff(TMat33[float64]) + stuff(TMat3[float64]) stuff(TMat34[float64]) stuff(TMat43[float64]) - stuff(TMat44[float64]) + stuff(TMat4[float64]) template withAllMats(stuff: untyped) = - stuff(TMat22[int]) + stuff(TMat2[int]) stuff(TMat23[int]) stuff(TMat32[int]) - stuff(TMat33[int]) + stuff(TMat3[int]) stuff(TMat34[int]) stuff(TMat43[int]) - stuff(TMat44[int]) - stuff(TMat22[float]) + stuff(TMat4[int]) + stuff(TMat2[float]) stuff(TMat23[float]) stuff(TMat32[float]) - stuff(TMat33[float]) + stuff(TMat3[float]) stuff(TMat34[float]) stuff(TMat43[float]) - stuff(TMat44[float]) + stuff(TMat4[float]) template testTranspose(t: typedesc) = echo "testTranspose: ", t @@ -112,30 +111,30 @@ withAllFloatMats(testAssignF) withAllMats(testRowCols) - echo Unit22 - echo Unit22i - echo Unit22i8 - echo Unit22i16 - echo Unit22i32 - echo Unit22i64 + echo Unit2 + echo Unit2i + echo Unit2i8 + echo Unit2i16 + echo Unit2i32 + echo Unit2i64 - echo Unit33 - echo Unit33i - echo Unit33i8 - echo Unit33i16 - echo Unit33i32 - echo Unit33i64 + echo Unit3 + echo Unit3i + echo Unit3i8 + echo Unit3i16 + echo Unit3i32 + echo Unit3i64 - echo Unit44 - echo Unit44i - echo Unit44i8 - echo Unit44i16 - echo Unit44i32 - echo Unit44i64 + echo Unit4 + echo Unit4i + echo Unit4i8 + echo Unit4i16 + echo Unit4i32 + echo Unit4i64 - echo TMat22[float]().randomized() * One2.randomized() - echo TMat33[float]().randomized() * One3.randomized() - echo TMat44[float]().randomized() * One4.randomized() + echo TMat2[float32]().randomized() * One2.randomized() + echo TMat3[float32]().randomized() * One3.randomized() + echo TMat4[float32]().randomized() * One4.randomized() randomize() testMatrix() diff -r d7c61e6580ea -r 9cfd59c93ae8 tests/test_vector.nim --- a/tests/test_vector.nim Tue May 09 19:52:33 2023 +0700 +++ b/tests/test_vector.nim Tue May 09 20:39:49 2023 +0700 @@ -1,7 +1,7 @@ import random import math -import semicongine/math/vector +import semicongine proc echoInfo(v: TVec) =