3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-09 10:51:50 +00:00
z3/test/trail.cpp
Leonardo de Moura 68269c43a6 other components
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2012-10-02 11:48:48 -07:00

43 lines
624 B
C++

/*++
Copyright (c) 2006 Microsoft Corporation
Module Name:
trail.cpp
Abstract:
<abstract>
Author:
Leonardo de Moura (leonardo) 2007-02-26.
Revision History:
--*/
#include"core_theory.h"
void tst_trail() {
core_theory t;
bvalue<int> v(10);
t.push();
v.set(t, 20);
v.set(t, 30);
SASSERT(v.get() == 30);
t.pop(1);
SASSERT(v.get() == 10);
t.push();
t.push();
v.set(t, 100);
SASSERT(v.get() == 100);
t.pop(2);
SASSERT(v.get() == 10);
t.push();
t.push();
v.set(t, 40);
SASSERT(v.get() == 40);
t.pop(1);
SASSERT(v.get() == 10);
}