aboutsummaryrefslogtreecommitdiff
path: root/testsuite/runnable/float_cast.elna
diff options
context:
space:
mode:
authorEugen Wissner <belka@caraus.de>2026-09-08 10:46:13 +0200
committerEugen Wissner <belka@caraus.de>2026-09-08 10:46:13 +0200
commit72f0f9b9629013e83fc4346a35113e9eecae45b5 (patch)
tree47779eda823f936e1c8d3e99dfc153901497c34f /testsuite/runnable/float_cast.elna
parent72f5e82196d95008ed12c12de6bdccf24361e106 (diff)
downloadelna-72f0f9b9629013e83fc4346a35113e9eecae45b5.tar.gz
Allow compile-time casts
Diffstat (limited to 'testsuite/runnable/float_cast.elna')
-rw-r--r--testsuite/runnable/float_cast.elna12
1 files changed, 12 insertions, 0 deletions
diff --git a/testsuite/runnable/float_cast.elna b/testsuite/runnable/float_cast.elna
new file mode 100644
index 0000000..08d14c5
--- /dev/null
+++ b/testsuite/runnable/float_cast.elna
@@ -0,0 +1,12 @@
+var
+ folded: Int := cast(2.9: Int)
+ measure: Double := -2.9
+
+program()
+begin
+ assert(folded = 2);
+ assert(cast(measure: Int) = -2);
+ assert(cast(folded: Double) = 2.0)
+return 0u8
+
+end.