From 0fb52a11520e049c0cf809254f7e862bac3a55fa Mon Sep 17 00:00:00 2001 From: ThePhD Date: Mon, 12 Jun 2017 10:49:38 -0400 Subject: [PATCH] I can write tests, I promise --- test_tables.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/test_tables.cpp b/test_tables.cpp index 3b7b47d7..bf1cb870 100644 --- a/test_tables.cpp +++ b/test_tables.cpp @@ -563,5 +563,12 @@ print(tbl[1]) int v1 = tbl[true]; int v2 = tbl[1]; REQUIRE(v1 == 10); - REQUIRE(v2 == 10); + REQUIRE(v2 == 20); + + tbl[true] = 30; + tbl[1] = 40; + v1 = tbl[true]; + v2 = tbl[1]; + REQUIRE(v1 == 30); + REQUIRE(v2 == 40); }