summaryrefslogtreecommitdiff
path: root/test/test_utf8.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_utf8.cpp')
-rw-r--r--test/test_utf8.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/test_utf8.cpp b/test/test_utf8.cpp
index 5447954..8c3cad2 100644
--- a/test/test_utf8.cpp
+++ b/test/test_utf8.cpp
@@ -137,13 +137,14 @@ TEST(Utf8Test, Utf8MultiByte)
virtual Result<void*, FudStatus> allocate(size_t bytes, size_t alignment) override final
{
+ using RetType = Result<void*, FudStatus>;
static_cast<void>(alignment);
if (bytes > m_memory.size() - m_allocated) {
- return FudStatus::AllocFailure;
+ return RetType::error(FudStatus::AllocFailure);
}
auto* data = m_memory.data() + m_allocated;
m_allocated += bytes;
- return data;
+ return RetType::okay(data);
}
virtual FudStatus deallocate(void* pointer, size_t bytes) override final