clean up test directory
This commit is contained in:
parent
183976b242
commit
e5fd8efcb6
16
test/cases/namespace_depends_on_compile_var/index.zig
Normal file
16
test/cases/namespace_depends_on_compile_var/index.zig
Normal file
|
@ -0,0 +1,16 @@
|
|||
const assert = @import("std").debug.assert;
|
||||
|
||||
#attribute("test")
|
||||
fn namespaceDependsOnCompileVar() {
|
||||
if (some_namespace.a_bool) {
|
||||
assert(some_namespace.a_bool);
|
||||
} else {
|
||||
assert(!some_namespace.a_bool);
|
||||
}
|
||||
}
|
||||
const some_namespace = switch(@compileVar("os")) {
|
||||
linux => @import("a.zig"),
|
||||
else => @import("b.zig"),
|
||||
};
|
||||
|
||||
|
17
test/cases/pub_enum/index.zig
Normal file
17
test/cases/pub_enum/index.zig
Normal file
|
@ -0,0 +1,17 @@
|
|||
const assert = @import("std").debug.assert;
|
||||
const other = @import("other.zig");
|
||||
|
||||
#attribute("test")
|
||||
fn pubEnum() {
|
||||
pubEnumTest(other.APubEnum.Two);
|
||||
}
|
||||
fn pubEnumTest(foo: other.APubEnum) {
|
||||
assert(foo == other.APubEnum.Two);
|
||||
}
|
||||
|
||||
#attribute("test")
|
||||
fn castWithImportedSymbol() {
|
||||
assert(other.size_t(42) == 42);
|
||||
}
|
||||
|
||||
|
|
@ -2,7 +2,6 @@ const std = @import("std");
|
|||
const assert = std.debug.assert;
|
||||
const str = std.str;
|
||||
const cstr = std.cstr;
|
||||
const other = @import("other.zig");
|
||||
// TODO '_' identifier for unused variable bindings
|
||||
const test_return_type_type = @import("cases/return_type_type.zig");
|
||||
const test_zeroes = @import("cases/zeroes.zig");
|
||||
|
@ -1242,21 +1241,6 @@ fn test3_2(f: Test3Foo) {
|
|||
|
||||
|
||||
|
||||
#attribute("test")
|
||||
fn pubEnum() {
|
||||
pubEnumTest(other.APubEnum.Two);
|
||||
}
|
||||
fn pubEnumTest(foo: other.APubEnum) {
|
||||
assert(foo == other.APubEnum.Two);
|
||||
}
|
||||
|
||||
|
||||
#attribute("test")
|
||||
fn castWithImportedSymbol() {
|
||||
assert(other.size_t(42) == 42);
|
||||
}
|
||||
|
||||
|
||||
#attribute("test")
|
||||
fn whileWithContinueExpr() {
|
||||
var sum: i32 = 0;
|
||||
|
@ -1637,20 +1621,6 @@ fn aGenericFn(inline T: type, inline a: T, b: T) -> T {
|
|||
}
|
||||
|
||||
|
||||
#attribute("test")
|
||||
fn namespaceDependsOnCompileVar() {
|
||||
if (some_namespace.a_bool) {
|
||||
assert(some_namespace.a_bool);
|
||||
} else {
|
||||
assert(!some_namespace.a_bool);
|
||||
}
|
||||
}
|
||||
const some_namespace = switch(@compileVar("os")) {
|
||||
linux => @import("a.zig"),
|
||||
else => @import("b.zig"),
|
||||
};
|
||||
|
||||
|
||||
#attribute("test")
|
||||
fn unsigned64BitDivision() {
|
||||
const result = div(1152921504606846976, 34359738365);
|
||||
|
|
Loading…
Reference in New Issue
Block a user