Skip to content

Commit

Permalink
Run BMP tests in parallel.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kelimion committed Jun 4, 2024
1 parent 7a85316 commit eb3df4e
Showing 1 changed file with 21 additions and 16 deletions.
37 changes: 21 additions & 16 deletions tests/core/image/test_core_image.odin
Original file line number Diff line number Diff line change
Expand Up @@ -2291,23 +2291,28 @@ Known_Bad_BMP_Tests := []Test{
}

@test
bmp_test :: proc(t: ^testing.T) {
total_tests := 0
total_expected := 0

BMP_Suites := [][]Test{
Basic_BMP_Tests,
OS2_Tests,
Questionable_BMP_Tests,
Unsupported_BMP_Tests,
Known_Bad_BMP_Tests,
}
bmp_test_basic :: proc(t: ^testing.T) {
run_bmp_suite(t, Basic_BMP_Tests)
}

for suite in BMP_Suites {
total_expected += len(suite)
total_tests += run_bmp_suite(t, suite)
}
testing.expectf(t, total_tests == total_expected, "Expected %v BMP tests, %v ran.", total_expected, total_tests)
@test
bmp_test_os2 :: proc(t: ^testing.T) {
run_bmp_suite(t, OS2_Tests)
}

@test
bmp_test_questionable :: proc(t: ^testing.T) {
run_bmp_suite(t, Questionable_BMP_Tests)
}

@test
bmp_test_unsupported :: proc(t: ^testing.T) {
run_bmp_suite(t, Unsupported_BMP_Tests)
}

@test
bmp_test_known_bad :: proc(t: ^testing.T) {
run_bmp_suite(t, Known_Bad_BMP_Tests)
}

run_bmp_suite :: proc(t: ^testing.T, suite: []Test) -> (subtotal: int) {
Expand Down

0 comments on commit eb3df4e

Please sign in to comment.