// /*--------------------------------------------------------*\ // | Main Program: Assert logging test // | // | Used to test various assert situations by making minor // | changes in commented and uncommented parts of the code. // \*--------------------------------------------------------*/ ///------------------------------------------------------------- /// Global Context --------------------------------------------- ///------------------------------------------------------------- #include "RESOLVE_Foundation.h" #include "CT/Queue/Kernel_1a_C.h" concrete_instance class Queue_Of_Integer : instantiates Queue_Kernel_1a_C {}; global_procedure_body MyProc2 (alters Queue_Of_Integer& q, alters Integer& x) { q[current] &= x; } global_procedure_body MyProc (alters Queue_Of_Integer& q, alters Integer& x) { MyProc2 (q, x); } ///------------------------------------------------------------- /// Interface -------------------------------------------------- ///------------------------------------------------------------- program_body main () { object Queue_Of_Integer q; object Integer x; //assert (true, "test 1"); //assert (true, "test 2"); //assert (false, "test 3"); // Violate requires for / x = 2; x = 7 / x; // Violate requires for Dequeue q.Enqueue (x); q.Dequeue (x); // Violate requires for accessor //q[current] &= x; MyProc (q, x); }