Skip to content

Failed

tests / 03 testsuite-gcc 3/3 / flattening_modelica_scodeinst.FunctionRecursive1.mo (from (result.xml))

Failing for the past 2 builds (Since #1 )
Took 0 ms.

Stacktrace

Output mismatch (see stdout for details)

Standard Output

 + FunctionRecursive1                                                                ... equation mismatch [time: 0]

==== Log /tmp/omc-rtest-omtmpuser/flattening/modelica/scodeinst/FunctionRecursive1.mo_temp8092/log-FunctionRecursive1.mo
function fac
  input Integer n;
  output Integer o;
algorithm
  if n <= 1 then
    o := 1;
  else
    o := n * fac(n - 1);
  end if;
end fac;

class FunctionRecursive1
  Integer x = fac(5);
end FunctionRecursive1;

Equation mismatch: diff says:
--- /tmp/omc-rtest-omtmpuser/flattening/modelica/scodeinst/FunctionRecursive1.mo_temp8092/equations-expected2024-06-15 01:43:59.791564940 +0000
+++ /tmp/omc-rtest-omtmpuser/flattening/modelica/scodeinst/FunctionRecursive1.mo_temp8092/equations-got2024-06-15 01:43:59.923564174 +0000
@@ -1,3 +1,14 @@
+function fac
+input Integer n;
+output Integer o;
+algorithm
+if n <= 1 then
+o := 1;
+else
+o := n * fac(n - 1);
+end if;
+end fac;
+
 class FunctionRecursive1
-Integer x = 120;
+Integer x = fac(5);
 end FunctionRecursive1;

Equation mismatch: omc-diff says:
Failed 'c' 'f'
Line 1: Text differs:
expected: class FunctionRecursive
got:      function fac

== 1 out of 1 tests failed [flattening/modelica/scodeinst/FunctionRecursive1.mo_temp8092, time: 0]