@@ -62,16 +62,16 @@ test "Opendal BDD test" {
62
62
.len = std .mem .len (testkit .content ),
63
63
};
64
64
const code = opendal .c .opendal_operator_blocking_write (testkit .p , testkit .path , data );
65
- try testing .expectEqual (code , @enumToInt (Code .OK ));
65
+ try testing .expectEqual (code , @intFromEnum (Code .OK ));
66
66
67
67
// The blocking file "test" should exist
68
68
var e : opendal.c.opendal_result_is_exist = opendal .c .opendal_operator_is_exist (testkit .p , testkit .path );
69
- try testing .expectEqual (e .code , @enumToInt (Code .OK ));
69
+ try testing .expectEqual (e .code , @intFromEnum (Code .OK ));
70
70
try testing .expect (e .is_exist );
71
71
72
72
// The blocking file "test" entry mode must be file
73
73
var s : opendal.c.opendal_result_stat = opendal .c .opendal_operator_stat (testkit .p , testkit .path );
74
- try testing .expectEqual (s .code , @enumToInt (Code .OK ));
74
+ try testing .expectEqual (s .code , @intFromEnum (Code .OK ));
75
75
var meta : [* c ]opendal.c.opendal_metadata = s .meta ;
76
76
try testing .expect (opendal .c .opendal_metadata_is_file (meta ));
77
77
@@ -82,7 +82,7 @@ test "Opendal BDD test" {
82
82
// The blocking file "test" must have content "Hello, World!"
83
83
var r : opendal.c.opendal_result_read = opendal .c .opendal_operator_blocking_read (testkit .p , testkit .path );
84
84
defer opendal .c .opendal_bytes_free (r .data );
85
- try testing .expect (r .code == @enumToInt (Code .OK ));
85
+ try testing .expect (r .code == @intFromEnum (Code .OK ));
86
86
try testing .expectEqual (std .mem .len (testkit .content ), r .data .* .len );
87
87
88
88
var count : usize = 0 ;
0 commit comments