mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-02 20:58:15 +00:00
rewrite mkdir_all
This commit is contained in:
+5
-11
@@ -1,12 +1,8 @@
|
||||
ODIN=../../odin
|
||||
PYTHON=$(shell which python3)
|
||||
|
||||
<<<<<<< HEAD
|
||||
all: download_test_assets image_test compress_test strings_test hash_test crypto_test noise_test encoding_test os2_test
|
||||
=======
|
||||
all: download_test_assets image_test compress_test strings_test hash_test crypto_test noise_test encoding_test \
|
||||
math_test linalg_glsl_math_test
|
||||
>>>>>>> upstream/master
|
||||
math_test linalg_glsl_math_test os2_test
|
||||
|
||||
download_test_assets:
|
||||
$(PYTHON) download_assets.py
|
||||
@@ -29,18 +25,16 @@ crypto_test:
|
||||
noise_test:
|
||||
$(ODIN) run math/noise -out=test_noise
|
||||
|
||||
os2_test:
|
||||
$(ODIN) run os2/test_os2.odin -out=test_os2
|
||||
|
||||
encoding_test:
|
||||
$(ODIN) run encoding/json -out=test_json
|
||||
$(ODIN) run encoding/varint -out=test_varint
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
|
||||
math_test:
|
||||
$(ODIN) run math/test_core_math.odin -out=test_core_math -collection:tests=..
|
||||
|
||||
linalg_glsl_math_test:
|
||||
$(ODIN) run math/linalg/glsl/test_linalg_glsl_math.odin -out=test_linalg_glsl_math -collection:tests=..
|
||||
>>>>>>> upstream/master
|
||||
|
||||
os2_test:
|
||||
$(ODIN) run os2/test_os2.odin -out=test_os2
|
||||
|
||||
|
||||
@@ -15,8 +15,9 @@ TEST_count := 0
|
||||
TEST_fail := 0
|
||||
|
||||
when ODIN_TEST {
|
||||
expect :: testing.expect
|
||||
log :: testing.log
|
||||
expect_value :: testing.expect_value
|
||||
expect :: testing.expect
|
||||
log :: testing.log
|
||||
} else {
|
||||
expect_value :: proc(t: ^testing.T, value, expected: $T, loc := #caller_location) where intrinsics.type_is_comparable(T) {
|
||||
fmt.printf("[%v] ", loc)
|
||||
@@ -170,7 +171,7 @@ file_test :: proc(t: ^testing.T) {
|
||||
_expect_no_error(t, os2.close(fd))
|
||||
|
||||
_expect_no_error(t, os2.remove("file.txt"))
|
||||
_expect_no_error(t, os2.mkdir("empty dir", 0))
|
||||
_expect_no_error(t, os2.mkdir("empty dir", 0o755))
|
||||
_expect_no_error(t, os2.remove("empty dir"))
|
||||
}
|
||||
|
||||
@@ -182,7 +183,7 @@ path_test :: proc(t: ^testing.T) {
|
||||
_expect_no_error(t, err)
|
||||
}
|
||||
|
||||
err = os2.mkdir_all("a/b/c/d", 0)
|
||||
err = os2.mkdir_all("a/b/c/d", 0o755)
|
||||
_expect_no_error(t, err)
|
||||
|
||||
expect(t, os2.exists("a"), "directory does not exist")
|
||||
|
||||
Reference in New Issue
Block a user