@@ -72,6 +72,7 @@ fileprivate struct ClangCompilationCachingTests: CoreBasedTests {
72
72
73
73
try await tester. checkBuild ( runDestination: . macOS, persistent: true ) { results in
74
74
results. checkNoTask ( . matchRuleType( " ScanDependencies " ) )
75
+ results. checkedWarnings = true
75
76
}
76
77
}
77
78
}
@@ -146,6 +147,7 @@ fileprivate struct ClangCompilationCachingTests: CoreBasedTests {
146
147
try await tester. fs. writeFileContents ( testWorkspace. sourceRoot. join ( " aProject/t.cpp " ) ) { stream in
147
148
stream <<<
148
149
"""
150
+ void foo(void) {}
149
151
"""
150
152
}
151
153
@@ -353,7 +355,7 @@ fileprivate struct ClangCompilationCachingTests: CoreBasedTests {
353
355
do {
354
356
let tester = try await BuildOperationTester ( getCore ( ) , testWorkspace, simulated: false )
355
357
try await tester. fs. writeFileContents ( testWorkspace. sourceRoot. join ( " aProject/file.c " ) ) { stream in
356
- stream <<< " "
358
+ stream <<< " void foo(void) {} "
357
359
}
358
360
359
361
let arena = ArenaInfo . buildArena ( derivedDataRoot: derivedDataPath)
@@ -370,7 +372,7 @@ fileprivate struct ClangCompilationCachingTests: CoreBasedTests {
370
372
do {
371
373
let tester = try await BuildOperationTester ( getCore ( ) , testWorkspace, simulated: false )
372
374
try await tester. fs. writeFileContents ( testWorkspace. sourceRoot. join ( " aProject/file.c " ) ) { stream in
373
- stream <<< " "
375
+ stream <<< " void foo(void) {} "
374
376
}
375
377
376
378
try await tester. checkBuild ( runDestination: . macOS) { results in
@@ -440,7 +442,7 @@ fileprivate struct ClangCompilationCachingTests: CoreBasedTests {
440
442
do {
441
443
let tester = try await BuildOperationTester ( getCore ( ) , testWorkspace, simulated: false )
442
444
try await tester. fs. writeFileContents ( testWorkspace. sourceRoot. join ( " aProject/file.c " ) ) { stream in
443
- stream <<< " "
445
+ stream <<< " void foo(void) {} "
444
446
}
445
447
446
448
let arena = ArenaInfo . buildArena ( derivedDataRoot: derivedDataPath)
@@ -459,7 +461,7 @@ fileprivate struct ClangCompilationCachingTests: CoreBasedTests {
459
461
do {
460
462
let tester = try await BuildOperationTester ( getCore ( ) , testWorkspace, simulated: false )
461
463
try await tester. fs. writeFileContents ( testWorkspace. sourceRoot. join ( " aProject/file.c " ) ) { stream in
462
- stream <<< " "
464
+ stream <<< " void foo(void) {} "
463
465
}
464
466
465
467
try await tester. checkBuild ( runDestination: . macOS) { results in
@@ -541,7 +543,7 @@ fileprivate struct ClangCompilationCachingTests: CoreBasedTests {
541
543
do {
542
544
let tester = try await BuildOperationTester ( getCore ( ) , testWorkspace, simulated: false )
543
545
try await tester. fs. writeFileContents ( testWorkspace. sourceRoot. join ( " aProject/file.c " ) ) { stream in
544
- stream <<< " "
546
+ stream <<< " void foo(void) {} "
545
547
}
546
548
547
549
let arena = ArenaInfo . buildArena ( derivedDataRoot: derivedDataPath)
@@ -562,7 +564,7 @@ fileprivate struct ClangCompilationCachingTests: CoreBasedTests {
562
564
do {
563
565
let tester = try await BuildOperationTester ( getCore ( ) , testWorkspace, simulated: false )
564
566
try await tester. fs. writeFileContents ( testWorkspace. sourceRoot. join ( " aProject/file.c " ) ) { stream in
565
- stream <<< " "
567
+ stream <<< " void foo(void) {} "
566
568
}
567
569
568
570
try await tester. checkBuild ( runDestination: . macOS) { results in
@@ -618,7 +620,7 @@ fileprivate struct ClangCompilationCachingTests: CoreBasedTests {
618
620
do {
619
621
let tester = try await BuildOperationTester ( getCore ( ) , testWorkspace, simulated: false )
620
622
try await tester. fs. writeFileContents ( testWorkspace. sourceRoot. join ( " aProject/file.c " ) ) { stream in
621
- stream <<< " "
623
+ stream <<< " void foo(void) {} "
622
624
}
623
625
624
626
try await tester. fs. writeFileContents ( blockListFilePath) { file in
@@ -644,7 +646,7 @@ fileprivate struct ClangCompilationCachingTests: CoreBasedTests {
644
646
do {
645
647
let tester = try await BuildOperationTester ( getCore ( ) , testWorkspace, simulated: false )
646
648
try await tester. fs. writeFileContents ( testWorkspace. sourceRoot. join ( " aProject/file.c " ) ) { stream in
647
- stream <<< " "
649
+ stream <<< " void foo(void) {} "
648
650
}
649
651
650
652
try await tester. fs. writeFileContents ( blockListFilePath) { file in
@@ -1550,6 +1552,7 @@ fileprivate struct ClangCompilationCachingTests: CoreBasedTests {
1550
1552
stream <<<
1551
1553
"""
1552
1554
#include " other.h "
1555
+ void foo(void) {}
1553
1556
"""
1554
1557
}
1555
1558
try await tester. fs. writeFileContents ( moduleDir. join ( " other.h " ) ) { stream in
@@ -1762,7 +1765,7 @@ fileprivate struct ClangCompilationCachingTests: CoreBasedTests {
1762
1765
"""
1763
1766
}
1764
1767
try await tester. fs. writeFileContents ( testWorkspace. sourceRoot. join ( " aProject/generated1.c.fake-customrule " ) ) { stream in
1765
- stream <<< " "
1768
+ stream <<< " void foo(void) {} "
1766
1769
}
1767
1770
1768
1771
try await tester. checkBuild ( runDestination: . macOS) { results in
@@ -1813,6 +1816,7 @@ fileprivate struct ClangCompilationCachingTests: CoreBasedTests {
1813
1816
try await tester. fs. writeFileContents ( testWorkspace. sourceRoot. join ( " aProject/t.c " ) ) { stream in
1814
1817
stream <<<
1815
1818
"""
1819
+ void foo(void) {}
1816
1820
"""
1817
1821
}
1818
1822
0 commit comments