29 if (buffer !=
nullptr) {
30 res.assign(buffer, buffer_len);
54 BlendfileLoadingBaseTest::SetUp();
83 std::string golden_file_path = tests::flags_test_asset_dir() +
SEP_STR + golden_stl;
88 bool are_equal = output_str == golden_str;
90 printf(
"failing test output in %s\n", out_file_path.c_str());
92 ASSERT_TRUE(are_equal);
94 BLI_delete(out_file_path.c_str(),
false,
false);
103 compare_to_golden(
"io_tests" SEP_STR "blend_geometry" SEP_STR "all_tris.blend",
109 compare_to_golden(
"io_tests" SEP_STR "blend_geometry" SEP_STR "all_quads.blend",
115 compare_to_golden(
"io_tests" SEP_STR "blend_geometry" SEP_STR "non_uniform_scale.blend",
121 compare_to_golden(
"io_tests" SEP_STR "blend_geometry" SEP_STR "cubes_positioned.blend",
File and directory operations.
Read Blender memory allocation and freeing.
struct Depsgraph * depsgraph
virtual void depsgraph_create(eEvaluationMode depsgraph_evaluation_mode)
bool blendfile_load(const char *filepath)
void compare_to_golden(const std::string &blendfile, const std::string &golden_stl)
bool load_file_and_depsgraph(const std::string &filepath)
static std::string get_temp_filename(const std::string &filename)
std::string filename(const std::string_view &str, size_t pos)
void export_frame(Depsgraph *depsgraph, float scene_unit_scale, const STLExportParams &export_params)
static std::string read_temp_file_in_string(const std::string &file_path)
constexpr bool save_failing_test_output
TEST_F(STLExportTest, all_tris)
void BKE_tempdir_session_purge()
char * STRNCPY(char(&dst)[N], const char *src)
void void void const char * BLI_path_basename(const char *path) ATTR_NONNULL(1) ATTR_WARN_UNUSED_RESULT
char * BLI_file_read_text_as_mem(const char *filepath, size_t pad_bytes, size_t *r_size)
int BLI_delete(const char *path, bool dir, bool recursive) ATTR_NONNULL()
const char * BKE_tempdir_base() ATTR_WARN_UNUSED_RESULT ATTR_RETURNS_NONNULL
void BKE_tempdir_init(const char *userdir)