1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00
llvm-mirror/test/Examples/Kaleidoscope/Chapter6.test
Mehdi Amini d46e92d6cb Fix incorrect "REQUIRE" (default_target->default_triple) introduced in 59f45a1cdb3
Adding `default_target` fixed the build by excluding these tests... but
this excluded these tests from ever running!
The correct feature check is `default_triple`
2020-06-23 18:22:39 +00:00

17 lines
361 B
Plaintext

# RUN: Kaleidoscope-Ch6 < %s 2>&1 | FileCheck %s
# REQUIRES: default_triple
# Test unary operator definition.
def unary-(x) 0 - x;
1 + (-1);
# CHECK: Evaluated to 0.000000
# Test binary operator definition.
def binary> 10 (lhs rhs) rhs < lhs;
def foo(x) if x > 10 then 0 else 1;
foo(9);
foo(11);
# CHECK: Evaluated to 1.000000
# CHECK: Evaluated to 0.000000