Skip to content

Commit 3a19abe

Browse files
committed
no-prelude-import
1 parent fce7824 commit 3a19abe

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

toolchain/testing/file_test.cpp

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,6 @@
2121
#include "testing/file_test/file_test_base.h"
2222
#include "toolchain/driver/driver.h"
2323

24-
// A flag specified by a test prelude to indicate the intention to include the
25-
// full production prelude.
26-
constexpr static llvm::StringLiteral ExpectFullPreludeFlag =
27-
"--expect-full-prelude";
28-
2924
namespace Carbon::Testing {
3025
namespace {
3126

@@ -127,9 +122,11 @@ auto ToolchainFileTest::Run(
127122
filtered_test_args.reserve(test_args.size());
128123
bool found_prelude_flag = false;
129124
for (auto arg : test_args) {
130-
bool custom_core = arg == "--custom-core";
131-
bool full_prelude = arg == ExpectFullPreludeFlag;
132-
if (custom_core || full_prelude) {
125+
bool driver_flag = arg == "--custom-core" || arg == "--no-prelude-import";
126+
// A flag specified by a test prelude to indicate the intention to include
127+
// the full production prelude.
128+
bool full_prelude = arg == "--expect-full-prelude";
129+
if (driver_flag || full_prelude) {
133130
found_prelude_flag = true;
134131
}
135132
if (!full_prelude) {

0 commit comments

Comments
 (0)