From cccec51c1e3470430087ca9ebbc13983975d887f Mon Sep 17 00:00:00 2001 From: Leonardo de Moura Date: Thu, 12 Jun 2014 22:18:27 -0700 Subject: [PATCH] test(lua): add get_user_coercions test Signed-off-by: Leonardo de Moura --- tests/lua/coe5.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/lua/coe5.lua b/tests/lua/coe5.lua index 6d713fc4a..f86fda9b2 100644 --- a/tests/lua/coe5.lua +++ b/tests/lua/coe5.lua @@ -24,3 +24,8 @@ for_each_coercion_user(env, function(C, D, f) print(tostring(C) .. " >-> " .. to print(get_coercion_to_sort(env, Const("abelian_ring", {1}))) assert(env:type_check(get_coercion_to_sort(env, Const("abelian_ring", {1})))) +print("Coercions (abelian ring): ") +cs = get_user_coercions(env, ab_ring) +for i = 1, #cs do + print(tostring(cs[i][1]) .. " : " .. tostring(cs[i][3]) .. " : " .. tostring(cs[i][2])) +end