| ... | ... | @@ -363,12 +363,12 @@ test "std.meta.trait.hasDecls" { |
| 363 | 363 | pub fn useless() void {} |
| 364 | 364 | }; |
| 365 | 365 | |
| 366 | | const tuple = .{"a", "b", "c"}; |
| 366 | const tuple = .{ "a", "b", "c" }; |
| 367 | 367 | |
| 368 | 368 | testing.expect(!hasDecls(TestStruct1, .{"a"})); |
| 369 | | testing.expect(hasDecls(TestStruct2, .{"a", "b"})); |
| 370 | | testing.expect(hasDecls(TestStruct2, .{"a", "b", "useless"})); |
| 371 | | testing.expect(!hasDecls(TestStruct2, .{"a", "b", "c"})); |
| 369 | testing.expect(hasDecls(TestStruct2, .{ "a", "b" })); |
| 370 | testing.expect(hasDecls(TestStruct2, .{ "a", "b", "useless" })); |
| 371 | testing.expect(!hasDecls(TestStruct2, .{ "a", "b", "c" })); |
| 372 | 372 | testing.expect(!hasDecls(TestStruct2, tuple)); |
| 373 | 373 | } |
| 374 | 374 | |
| ... | ... | @@ -389,14 +389,13 @@ test "std.meta.trait.hasFields" { |
| 389 | 389 | pub fn useless() void {} |
| 390 | 390 | }; |
| 391 | 391 | |
| 392 | | |
| 393 | | const tuple = .{"a", "b", "c"}; |
| 392 | const tuple = .{ "a", "b", "c" }; |
| 394 | 393 | |
| 395 | 394 | testing.expect(!hasFields(TestStruct1, .{"a"})); |
| 396 | | testing.expect(hasFields(TestStruct2, .{"a", "b"})); |
| 397 | | testing.expect(hasFields(TestStruct2, .{"a", "b", "c"})); |
| 395 | testing.expect(hasFields(TestStruct2, .{ "a", "b" })); |
| 396 | testing.expect(hasFields(TestStruct2, .{ "a", "b", "c" })); |
| 398 | 397 | testing.expect(hasFields(TestStruct2, tuple)); |
| 399 | | testing.expect(!hasFields(TestStruct2, .{"a", "b", "useless"})); |
| 398 | testing.expect(!hasFields(TestStruct2, .{ "a", "b", "useless" })); |
| 400 | 399 | } |
| 401 | 400 | |
| 402 | 401 | pub fn hasFunctions(comptime T: type, comptime names: var) bool { |
| ... | ... | @@ -414,10 +413,10 @@ test "std.meta.trait.hasFunctions" { |
| 414 | 413 | fn b() void {} |
| 415 | 414 | }; |
| 416 | 415 | |
| 417 | | const tuple = .{"a", "b", "c"}; |
| 416 | const tuple = .{ "a", "b", "c" }; |
| 418 | 417 | |
| 419 | 418 | testing.expect(!hasFunctions(TestStruct1, .{"a"})); |
| 420 | | testing.expect(hasFunctions(TestStruct2, .{"a", "b"})); |
| 421 | | testing.expect(!hasFunctions(TestStruct2, .{"a", "b", "c"})); |
| 419 | testing.expect(hasFunctions(TestStruct2, .{ "a", "b" })); |
| 420 | testing.expect(!hasFunctions(TestStruct2, .{ "a", "b", "c" })); |
| 422 | 421 | testing.expect(!hasFunctions(TestStruct2, tuple)); |
| 423 | 422 | } |