Cycles: Add regression test for util_md5_string
This commit is contained in:
@@ -34,6 +34,7 @@ set(SRC
|
||||
render_graph_finalize_test.cpp
|
||||
util_aligned_malloc_test.cpp
|
||||
util_math_test.cpp
|
||||
util_md5_test.cpp
|
||||
util_path_test.cpp
|
||||
util_string_test.cpp
|
||||
util_task_test.cpp
|
||||
|
||||
16
intern/cycles/test/util_md5_test.cpp
Normal file
16
intern/cycles/test/util_md5_test.cpp
Normal file
@@ -0,0 +1,16 @@
|
||||
/* SPDX-License-Identifier: Apache-2.0
|
||||
* Copyright 2011-2022 Blender Foundation */
|
||||
|
||||
#include "testing/testing.h"
|
||||
|
||||
#include "util/md5.h"
|
||||
|
||||
CCL_NAMESPACE_BEGIN
|
||||
|
||||
TEST(util, util_md5_string)
|
||||
{
|
||||
/* The hash is calculated using `echo -n "Hello, World\!" | md5 | tr '[:lower:]' '[:upper:]'`. */
|
||||
EXPECT_EQ(util_md5_string("Hello, World!"), "65A8E27D8879283831B664BD8B7F0AD4");
|
||||
}
|
||||
|
||||
CCL_NAMESPACE_END
|
||||
Reference in New Issue
Block a user