|
23 | 23 |
|
24 | 24 | using namespace swift;
|
25 | 25 | using namespace llvm;
|
26 |
| -using std::isnan; |
27 | 26 |
|
28 | 27 | class ArithmeticExpr {
|
29 | 28 | public:
|
@@ -325,34 +324,34 @@ TEST(ArithmeticEvaluator, Cycle) {
|
325 | 324 |
|
326 | 325 | // Evaluate when there is a cycle.
|
327 | 326 | UncachedEvaluationRule::brokeCycle = false;
|
328 |
| - EXPECT_TRUE(isnan(evaluator(UncachedEvaluationRule(product)))); |
| 327 | + EXPECT_TRUE(std::isnan(evaluator(UncachedEvaluationRule(product)))); |
329 | 328 | EXPECT_TRUE(UncachedEvaluationRule::brokeCycle);
|
330 | 329 |
|
331 | 330 | // Cycle-breaking result is cached.
|
332 |
| - EXPECT_TRUE(isnan(evaluator(UncachedEvaluationRule(product)))); |
| 331 | + EXPECT_TRUE(std::isnan(evaluator(UncachedEvaluationRule(product)))); |
333 | 332 | UncachedEvaluationRule::brokeCycle = false;
|
334 | 333 | EXPECT_FALSE(UncachedEvaluationRule::brokeCycle);
|
335 | 334 |
|
336 | 335 | // Evaluate when there is a cycle.
|
337 | 336 | evaluator.clearCache();
|
338 | 337 | InternallyCachedEvaluationRule::brokeCycle = false;
|
339 |
| - EXPECT_TRUE(isnan(evaluator(InternallyCachedEvaluationRule(product)))); |
| 338 | + EXPECT_TRUE(std::isnan(evaluator(InternallyCachedEvaluationRule(product)))); |
340 | 339 | EXPECT_TRUE(InternallyCachedEvaluationRule::brokeCycle);
|
341 | 340 |
|
342 | 341 | // Cycle-breaking result is cached.
|
343 | 342 | InternallyCachedEvaluationRule::brokeCycle = false;
|
344 |
| - EXPECT_TRUE(isnan(evaluator(InternallyCachedEvaluationRule(product)))); |
| 343 | + EXPECT_TRUE(std::isnan(evaluator(InternallyCachedEvaluationRule(product)))); |
345 | 344 | EXPECT_FALSE(InternallyCachedEvaluationRule::brokeCycle);
|
346 | 345 |
|
347 | 346 | // Evaluate when there is a cycle.
|
348 | 347 | evaluator.clearCache();
|
349 | 348 | ExternallyCachedEvaluationRule::brokeCycle = false;
|
350 |
| - EXPECT_TRUE(isnan(evaluator(ExternallyCachedEvaluationRule(product)))); |
| 349 | + EXPECT_TRUE(std::isnan(evaluator(ExternallyCachedEvaluationRule(product)))); |
351 | 350 | EXPECT_TRUE(ExternallyCachedEvaluationRule::brokeCycle);
|
352 | 351 |
|
353 | 352 | // Cycle-breaking result is cached.
|
354 | 353 | ExternallyCachedEvaluationRule::brokeCycle = false;
|
355 |
| - EXPECT_TRUE(isnan(evaluator(ExternallyCachedEvaluationRule(product)))); |
| 354 | + EXPECT_TRUE(std::isnan(evaluator(ExternallyCachedEvaluationRule(product)))); |
356 | 355 | EXPECT_FALSE(ExternallyCachedEvaluationRule::brokeCycle);
|
357 | 356 |
|
358 | 357 | // Dependency printing.
|
|
0 commit comments