From 1f007ba85a91fa59af94af51e257d59666edaaba Mon Sep 17 00:00:00 2001
From: Stephane Del Pino <stephane.delpino44@gmail.com>
Date: Mon, 4 Nov 2019 16:31:35 +0100
Subject: [PATCH] Add missing tests for CFunctionEmbedderTable

---
 tests/test_CFunctionEmbedderTable.cpp | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/tests/test_CFunctionEmbedderTable.cpp b/tests/test_CFunctionEmbedderTable.cpp
index 28d15ce0e..797536f42 100644
--- a/tests/test_CFunctionEmbedderTable.cpp
+++ b/tests/test_CFunctionEmbedderTable.cpp
@@ -26,7 +26,15 @@ TEST_CASE("CFunctionEmbedderTable", "[language]")
   REQUIRE(table[0] == embedded_sin);
   REQUIRE(table[1] == embedded_greater);
 
+  const auto& const_table = table;
+
+  REQUIRE(const_table.size() == 2);
+
+  REQUIRE(const_table[0] == embedded_sin);
+  REQUIRE(const_table[1] == embedded_greater);
+
 #ifndef NDEBUG
   REQUIRE_THROWS_AS(table[2], AssertError);
+  REQUIRE_THROWS_AS(const_table[2], AssertError);
 #endif   // NDEBUG
 }
-- 
GitLab