Skip to content

Commit 23d7ab1

Browse files
authored
Merge pull request #17156 from DougGregor/isnan
2 parents 7148de5 + ca7bbe1 commit 23d7ab1

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

unittests/AST/ArithmeticEvaluator.cpp

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323

2424
using namespace swift;
2525
using namespace llvm;
26-
using std::isnan;
2726

2827
class ArithmeticExpr {
2928
public:
@@ -325,34 +324,34 @@ TEST(ArithmeticEvaluator, Cycle) {
325324

326325
// Evaluate when there is a cycle.
327326
UncachedEvaluationRule::brokeCycle = false;
328-
EXPECT_TRUE(isnan(evaluator(UncachedEvaluationRule(product))));
327+
EXPECT_TRUE(std::isnan(evaluator(UncachedEvaluationRule(product))));
329328
EXPECT_TRUE(UncachedEvaluationRule::brokeCycle);
330329

331330
// Cycle-breaking result is cached.
332-
EXPECT_TRUE(isnan(evaluator(UncachedEvaluationRule(product))));
331+
EXPECT_TRUE(std::isnan(evaluator(UncachedEvaluationRule(product))));
333332
UncachedEvaluationRule::brokeCycle = false;
334333
EXPECT_FALSE(UncachedEvaluationRule::brokeCycle);
335334

336335
// Evaluate when there is a cycle.
337336
evaluator.clearCache();
338337
InternallyCachedEvaluationRule::brokeCycle = false;
339-
EXPECT_TRUE(isnan(evaluator(InternallyCachedEvaluationRule(product))));
338+
EXPECT_TRUE(std::isnan(evaluator(InternallyCachedEvaluationRule(product))));
340339
EXPECT_TRUE(InternallyCachedEvaluationRule::brokeCycle);
341340

342341
// Cycle-breaking result is cached.
343342
InternallyCachedEvaluationRule::brokeCycle = false;
344-
EXPECT_TRUE(isnan(evaluator(InternallyCachedEvaluationRule(product))));
343+
EXPECT_TRUE(std::isnan(evaluator(InternallyCachedEvaluationRule(product))));
345344
EXPECT_FALSE(InternallyCachedEvaluationRule::brokeCycle);
346345

347346
// Evaluate when there is a cycle.
348347
evaluator.clearCache();
349348
ExternallyCachedEvaluationRule::brokeCycle = false;
350-
EXPECT_TRUE(isnan(evaluator(ExternallyCachedEvaluationRule(product))));
349+
EXPECT_TRUE(std::isnan(evaluator(ExternallyCachedEvaluationRule(product))));
351350
EXPECT_TRUE(ExternallyCachedEvaluationRule::brokeCycle);
352351

353352
// Cycle-breaking result is cached.
354353
ExternallyCachedEvaluationRule::brokeCycle = false;
355-
EXPECT_TRUE(isnan(evaluator(ExternallyCachedEvaluationRule(product))));
354+
EXPECT_TRUE(std::isnan(evaluator(ExternallyCachedEvaluationRule(product))));
356355
EXPECT_FALSE(ExternallyCachedEvaluationRule::brokeCycle);
357356

358357
// Dependency printing.

0 commit comments

Comments
 (0)