From 9cff2f7b8a3854124be3bbd55ebb33513ee3820d Mon Sep 17 00:00:00 2001 From: Dale Weiler Date: Tue, 5 Feb 2013 17:15:28 +0000 Subject: [PATCH] perl ops -> pops --- tests/pops.qc | 19 +++++++++++++++++++ tests/pops.tmpl | 7 +++++++ 2 files changed, 26 insertions(+) create mode 100644 tests/pops.qc create mode 100644 tests/pops.tmpl diff --git a/tests/pops.qc b/tests/pops.qc new file mode 100644 index 0000000..ee6631b --- /dev/null +++ b/tests/pops.qc @@ -0,0 +1,19 @@ +void main() { + /* so far only one perl operator is implemented */ + float x = 100; + float y = 200; + float z = 300; + + /* to ensure runtime */ + x += 1; + y += 1; + z += 1; + + float test_x = (x <=> x + 1); // -1 less than + float test_y = (x <=> x); // 0 equal + float test_z = (x <=> x - 1); // 1 greater than + + print(ftos(test_x), "\n"); + print(ftos(test_y), "\n"); + print(ftos(test_z), "\n"); +} diff --git a/tests/pops.tmpl b/tests/pops.tmpl new file mode 100644 index 0000000..35b7d41 --- /dev/null +++ b/tests/pops.tmpl @@ -0,0 +1,7 @@ +I: pops.qc +D: test perl operators +T: -execute +C: -std=gmqcc +M: -1 +M: 0 +M: 1 -- 2.39.2