mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
Merge pull request #3781 from Feoramund/add-missing-test-imports
Add missing imports to `core` test suite
This commit is contained in:
@@ -1113,6 +1113,13 @@ test_if_map_cstrings_get_freed :: proc(t: ^testing.T) {
|
|||||||
|
|
||||||
@(test)
|
@(test)
|
||||||
test_os_handle :: proc(t: ^testing.T) {
|
test_os_handle :: proc(t: ^testing.T) {
|
||||||
|
defer if !testing.failed(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)
|
||||||
|
}
|
||||||
|
|
||||||
TEMPORARY_FILENAME :: "test_core_flags_write_test_output_data"
|
TEMPORARY_FILENAME :: "test_core_flags_write_test_output_data"
|
||||||
|
|
||||||
test_data := "Hellope!"
|
test_data := "Hellope!"
|
||||||
@@ -1147,14 +1154,6 @@ test_os_handle :: proc(t: ^testing.T) {
|
|||||||
testing.expect_value(t, read_ok, true)
|
testing.expect_value(t, read_ok, true)
|
||||||
file_contents_equal := 0 == bytes.compare(transmute([]u8)test_data, data)
|
file_contents_equal := 0 == bytes.compare(transmute([]u8)test_data, data)
|
||||||
testing.expectf(t, file_contents_equal, "expected file contents to be the same, got %v", data)
|
testing.expectf(t, file_contents_equal, "expected file contents to be the same, got %v", data)
|
||||||
|
|
||||||
if file_contents_equal {
|
|
||||||
// Delete the file now that we're done.
|
|
||||||
//
|
|
||||||
// This is not done as a defer or all the time, just in case the file
|
|
||||||
// is useful to debugging.
|
|
||||||
testing.expect_value(t, os.remove(TEMPORARY_FILENAME), os.ERROR_NONE)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@(test)
|
@(test)
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ download_assets :: proc() {
|
|||||||
@(require) import "encoding/json"
|
@(require) import "encoding/json"
|
||||||
@(require) import "encoding/varint"
|
@(require) import "encoding/varint"
|
||||||
@(require) import "encoding/xml"
|
@(require) import "encoding/xml"
|
||||||
|
@(require) import "flags"
|
||||||
@(require) import "fmt"
|
@(require) import "fmt"
|
||||||
@(require) import "math"
|
@(require) import "math"
|
||||||
@(require) import "math/big"
|
@(require) import "math/big"
|
||||||
@@ -37,3 +38,4 @@ download_assets :: proc() {
|
|||||||
@(require) import "text/match"
|
@(require) import "text/match"
|
||||||
@(require) import "thread"
|
@(require) import "thread"
|
||||||
@(require) import "time"
|
@(require) import "time"
|
||||||
|
@(require) import "unicode"
|
||||||
|
|||||||
Reference in New Issue
Block a user