test(kernel/expr): check if the serializer works for metavariables
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
5058e403b5
commit
438fa8251b
1 changed files with 11 additions and 0 deletions
|
@ -402,6 +402,16 @@ static void tst20() {
|
||||||
check_serializer(t);
|
check_serializer(t);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void tst21() {
|
||||||
|
local_context lctx;
|
||||||
|
lctx = cons(mk_lift(1, 2), lctx);
|
||||||
|
lctx = cons(mk_inst(1, Const("a")), lctx);
|
||||||
|
lctx = cons(mk_lift(0, 1), lctx);
|
||||||
|
expr m = mk_metavar("m1", lctx);
|
||||||
|
expr t = Const("f")(m, m, mk_metavar("m2"));
|
||||||
|
check_serializer(t);
|
||||||
|
}
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
save_stack_info();
|
save_stack_info();
|
||||||
lean_assert(sizeof(expr) == sizeof(optional<expr>));
|
lean_assert(sizeof(expr) == sizeof(optional<expr>));
|
||||||
|
@ -425,6 +435,7 @@ int main() {
|
||||||
tst18();
|
tst18();
|
||||||
tst19();
|
tst19();
|
||||||
tst20();
|
tst20();
|
||||||
|
tst21();
|
||||||
std::cout << "sizeof(expr): " << sizeof(expr) << "\n";
|
std::cout << "sizeof(expr): " << sizeof(expr) << "\n";
|
||||||
std::cout << "sizeof(expr_app): " << sizeof(expr_app) << "\n";
|
std::cout << "sizeof(expr_app): " << sizeof(expr_app) << "\n";
|
||||||
std::cout << "sizeof(expr_cell): " << sizeof(expr_cell) << "\n";
|
std::cout << "sizeof(expr_cell): " << sizeof(expr_cell) << "\n";
|
||||||
|
|
Loading…
Reference in a new issue