xref: /llvm-project/llvm/test/Examples/Kaleidoscope/Chapter7.test (revision 8b64adb0a2853f42c09bd98759eec86f51b546ba)
1# RUN: Kaleidoscope-Ch7 < %s 2>&1 | FileCheck %s
2# REQUIRES: default_triple
3
4# Sequence operator and iterative fibonacci function to test user defined vars.
5def binary : 1 (x y) y;
6
7def fibi(x)
8  var a = 1, b = 1, c in
9  (for i = 3, i < x in
10     c = a + b :
11     a = b :
12     b = c) :
13  b;
14
15fibi(10);
16# CHECK: Evaluated to 55.000000
17