Opened 18 years ago

Last modified 14 years ago

#96 closed defect (fixed)

assert and .mos testcases problem

Reported by: Adrian Pop Owned by: Adrian Pop
Priority: critical Milestone:
Component: Version:
Keywords: Cc: Adrian Pop, Adrian Pop

Description

See comments

Change History (3)

comment:1 by Adrian Pop, 18 years ago

Model:
class AssertTest

parameter Real lowlimit;
parameter Real highlimit;
Real x = 5;

equation

assert(x >= lowlimit and x <= highlimit, "Variable x out of limit");

end AssertTest;

class Test2

AssertTest assertTest(lowlimit = 6, highlimit = 20);

end Test2;

How can a testcase can be written for this model?
Should the status be incorrect or correct in the .mos file?
The problem is that the simulation is always succeeding in the mos file.

comment:2 by Peter Aronsson, 18 years ago

The problem is also that the assertion is not translated to the simulation code.

comment:3 by Martin Sjölund, 14 years ago

Fixed (see StringTest.mos)

Note: See TracTickets for help on using tickets.