mirror of
https://github.com/Ed94/Odin.git
synced 2026-07-23 16:07:52 +00:00
Begin mapping os.Error in the rest of the codebase
This commit is contained in:
@@ -1117,7 +1117,7 @@ test_os_handle :: proc(t: ^testing.T) {
|
||||
// Delete the file now that we're done.
|
||||
//
|
||||
// This is not done all the time, just in case the file is useful to debugging.
|
||||
testing.expect_value(t, os.remove(TEMPORARY_FILENAME), os.ERROR_NONE)
|
||||
testing.expect_value(t, os.remove(TEMPORARY_FILENAME), nil)
|
||||
}
|
||||
|
||||
TEMPORARY_FILENAME :: "test_core_flags_write_test_output_data"
|
||||
|
||||
@@ -7,12 +7,12 @@ import "core:testing"
|
||||
|
||||
@(test)
|
||||
read_dir :: proc(t: ^testing.T) {
|
||||
fd, errno := os.open(#directory + "/dir")
|
||||
testing.expect_value(t, errno, os.ERROR_NONE)
|
||||
fd, err := os.open(#directory + "/dir")
|
||||
testing.expect_value(t, err, nil)
|
||||
defer os.close(fd)
|
||||
|
||||
dir, errno2 := os.read_dir(fd, -1)
|
||||
testing.expect_value(t, errno2, os.ERROR_NONE)
|
||||
dir, err2 := os.read_dir(fd, -1)
|
||||
testing.expect_value(t, err2, nil)
|
||||
defer os.file_info_slice_delete(dir)
|
||||
|
||||
slice.sort_by_key(dir, proc(fi: os.File_Info) -> string { return fi.name })
|
||||
|
||||
@@ -439,7 +439,7 @@ main :: proc() {
|
||||
}
|
||||
save_path := fmt.tprintf("verify/test_%v_%v.odin", test.package_name, code_test_name)
|
||||
|
||||
test_file_handle, err := os.open(save_path, os.O_WRONLY | os.O_CREATE); if err != 0 {
|
||||
test_file_handle, err := os.open(save_path, os.O_WRONLY | os.O_CREATE); if err != nil {
|
||||
fmt.eprintf("We could not open the file to the path %q for writing\n", save_path)
|
||||
g_bad_doc = true
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user