mirror of
https://github.com/Ed94/Odin.git
synced 2026-07-31 11:50:07 +00:00
fix test
This commit is contained in:
@@ -442,17 +442,17 @@ when ODIN_OS == .Darwin {
|
|||||||
|
|
||||||
pthread_t :: distinct u64
|
pthread_t :: distinct u64
|
||||||
|
|
||||||
pthread_attr_t :: struct #align(16) {
|
pthread_attr_t :: struct #align(8) {
|
||||||
_: [8]byte,
|
_: [8]byte,
|
||||||
}
|
}
|
||||||
|
|
||||||
pthread_key_t :: distinct c.int
|
pthread_key_t :: distinct c.int
|
||||||
|
|
||||||
pthread_mutex_t :: struct #align(16) {
|
pthread_mutex_t :: struct #align(8) {
|
||||||
_: [8]byte,
|
_: [8]byte,
|
||||||
}
|
}
|
||||||
|
|
||||||
pthread_cond_t :: struct #align(16) {
|
pthread_cond_t :: struct #align(8) {
|
||||||
_: [8]byte,
|
_: [8]byte,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
package unix
|
package unix
|
||||||
|
|
||||||
import "core:sys/posix"
|
import "core:c"
|
||||||
|
|
||||||
timespec :: posix.timespec
|
timespec :: struct {
|
||||||
|
secs: i64,
|
||||||
|
nsecs: c.long,
|
||||||
|
}
|
||||||
|
|||||||
@@ -196,7 +196,7 @@ test_stat :: proc(t: ^testing.T) {
|
|||||||
stat: posix.stat_t
|
stat: posix.stat_t
|
||||||
testing.expect_value(t, posix.stat(#file, &stat), posix.result.OK)
|
testing.expect_value(t, posix.stat(#file, &stat), posix.result.OK)
|
||||||
testing.expect(t, posix.S_ISREG(stat.st_mode))
|
testing.expect(t, posix.S_ISREG(stat.st_mode))
|
||||||
testing.expect_value(t, stat.st_mode, posix.mode_t{.IROTH, .IRGRP, .IRUSR, .IWGRP, .IWUSR, .IFREG})
|
testing.expect_value(t, stat.st_mode, posix.mode_t{.IROTH, .IRGRP, .IRUSR, .IWUSR, .IFREG})
|
||||||
|
|
||||||
CONTENT := #load(#file)
|
CONTENT := #load(#file)
|
||||||
testing.expect_value(t, stat.st_size, posix.off_t(len(CONTENT)))
|
testing.expect_value(t, stat.st_size, posix.off_t(len(CONTENT)))
|
||||||
|
|||||||
Reference in New Issue
Block a user