diff --git a/test/raw.cpp b/test/raw.cpp
index fd8ae71..8be8b7b 100644
--- a/test/raw.cpp
+++ b/test/raw.cpp
@@ -23,9 +23,10 @@
 
 TEST_CASE("Copy From Empty", "[CopyFrom]")
 {
-    const std::string_view s;
+    const std::string_view cs;
+    CHECK_THROWS_AS(copyFrom<int>(cs), std::runtime_error);
+    std::string_view s;
     CHECK_THROWS_AS(copyFrom<int>(s), std::runtime_error);
-    CHECK(s.empty());
 }
 
 TEST_CASE("Copy From Basic", "[CopyFrom]")
@@ -43,6 +44,39 @@
     CHECK('d' == copyFrom<char>(s2));
 }
 
+struct Int
+{
+    uint8_t data[sizeof(int)];
+
+    inline bool operator==(const Int& other) const
+    {
+        return memcmp(data, other.data, sizeof(data)) == 0;
+    }
+};
+
+TEST_CASE("Ref From Empty", "[RefFrom]")
+{
+    const std::string_view cs;
+    CHECK_THROWS_AS(refFrom<Int>(cs), std::runtime_error);
+    std::string_view s;
+    CHECK_THROWS_AS(refFrom<Int>(s), std::runtime_error);
+}
+
+TEST_CASE("Ref From Basic", "[RefFrom]")
+{
+    Int a = {4, 0, 0, 4};
+    const std::string_view s(reinterpret_cast<char*>(&a), sizeof(a));
+    CHECK(a == refFrom<Int>(s));
+}
+
+TEST_CASE("Ref From Partial", "[RefFrom]")
+{
+    const std::vector<char> s = {'a', 'b', 'c'};
+    CHECK('a' == refFrom<char>(s));
+    const char s2[] = "def";
+    CHECK('d' == refFrom<char>(s2));
+}
+
 TEST_CASE("Extract Too Small", "[Extract]")
 {
     std::string_view s("a");
@@ -65,6 +99,28 @@
     CHECK(2 == s.size());
 }
 
+TEST_CASE("Extract Ref Too Small", "[ExtractRef]")
+{
+    std::string_view s("a");
+    CHECK_THROWS_AS(extractRef<Int>(s), std::runtime_error);
+    CHECK(1 == s.size());
+}
+
+TEST_CASE("Extract Ref Basic", "[ExtractRef]")
+{
+    Int a = {4, 0, 0, 4};
+    std::string_view s(reinterpret_cast<char*>(&a), sizeof(a));
+    CHECK(a == extractRef<Int>(s));
+    CHECK(s.empty());
+}
+
+TEST_CASE("Extract Ref Partial", "[ExtractRef]")
+{
+    std::string_view s("abc");
+    CHECK('a' == extractRef<char>(s));
+    CHECK(2 == s.size());
+}
+
 TEST_CASE("As View Byte", "[AsView]")
 {
     int32_t a = 4;
@@ -115,6 +171,30 @@
     CHECK(v.size() - 1 == s.size());
 }
 
+TEST_CASE("Span Extract Ref TooSmall", "[ExtractRef]")
+{
+    const std::vector<char> v = {'c'};
+    span<const char> s = v;
+    CHECK_THROWS_AS(extractRef<Int>(s), std::runtime_error);
+    CHECK(1 == s.size());
+}
+
+TEST_CASE("Span Extract Ref Basic", "[ExtractRef]")
+{
+    const std::vector<Int> v = {{4, 0, 0, 4}};
+    span<const Int> s = v;
+    CHECK(v[0] == extractRef<Int>(s));
+    CHECK(s.empty());
+}
+
+TEST_CASE("Span Extract Ref Larger", "[ExtractRef]")
+{
+    const std::vector<Int> v{{3}, {4}, {5}};
+    span<const Int> s = v;
+    CHECK(v[0] == extractRef<Int>(s));
+    CHECK(v.size() - 1 == s.size());
+}
+
 TEST_CASE("As Span const", "[AsSpan]")
 {
     const uint64_t data = htole64(0xffff0000);
