Skip to content

Commit 8b76156

Browse files
committed
Merge branch 'bmp' of github.com:Kelimion/Odin into bmp
2 parents 2566b9b + eb3df4e commit 8b76156

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

tests/core/image/build.bat

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
@echo off
2-
odin test . -define:ODIN_TEST_PROGRESS_WIDTH=12 -vet -strict-style
2+
odin test . -vet -strict-style

tests/core/image/test_core_image.odin

+6-4
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,10 @@ import "core:strings"
2525
import "core:mem"
2626
import "core:time"
2727

28+
TEST_SUITE_PATH_PNG :: ODIN_ROOT + "tests/core/assets/PNG"
29+
TEST_SUITE_PATH_BMP :: ODIN_ROOT + "tests/core/assets/BMP"
30+
2831
I_Error :: image.Error
29-
TEST_SUITE_PATH :: ODIN_ROOT + "tests/core/assets/"
3032

3133
Test :: struct {
3234
file: string,
@@ -1452,7 +1454,7 @@ png_test_no_postproc :: proc(t: ^testing.T) {
14521454

14531455
run_png_suite :: proc(t: ^testing.T, suite: []Test) {
14541456
for file in suite {
1455-
test_file := strings.concatenate({TEST_SUITE_PATH, "/PNG/", file.file, ".png"}, context.allocator)
1457+
test_file := strings.concatenate({TEST_SUITE_PATH_PNG, "/", file.file, ".png"}, context.allocator)
14561458
defer delete(test_file)
14571459

14581460
img: ^png.Image
@@ -2315,7 +2317,7 @@ bmp_test_known_bad :: proc(t: ^testing.T) {
23152317

23162318
run_bmp_suite :: proc(t: ^testing.T, suite: []Test) {
23172319
for file in suite {
2318-
test_file := strings.concatenate({TEST_SUITE_PATH, "/BMP/", file.file, ".bmp"}, context.allocator)
2320+
test_file := strings.concatenate({TEST_SUITE_PATH_BMP, "/", file.file, ".bmp"}, context.allocator)
23192321
defer delete(test_file)
23202322

23212323
for test in file.tests {
@@ -2325,7 +2327,7 @@ run_bmp_suite :: proc(t: ^testing.T, suite: []Test) {
23252327
testing.expectf(t, passed, "%q failed to load with error %v.", file.file, err)
23262328

23272329
if err == nil { // No point in running the other tests if it didn't load.
2328-
qoi_file := strings.concatenate({TEST_SUITE_PATH, "/BMP/", file.file, ".qoi"}, context.allocator)
2330+
qoi_file := strings.concatenate({TEST_SUITE_PATH_BMP, "/", file.file, ".qoi"}, context.allocator)
23292331
defer delete(qoi_file)
23302332

23312333
qoi.save(qoi_file, img)

0 commit comments

Comments
 (0)