mirror of
https://github.com/Z3Prover/z3
synced 2025-04-08 18:31:49 +00:00
43 lines
624 B
C++
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);
|
|
}
|