mirror of
https://github.com/Z3Prover/z3
synced 2025-04-27 02:45:51 +00:00
other components
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
e9eab22e5c
commit
68269c43a6
250 changed files with 70871 additions and 0 deletions
42
test/trail.cpp
Normal file
42
test/trail.cpp
Normal file
|
@ -0,0 +1,42 @@
|
|||
/*++
|
||||
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);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue