32 if (buffer !=
nullptr) {
33 res.assign((
const char *)buffer, buffer_len);
62 BlendfileLoadingBaseTest::SetUp();
92 std::string golden_file_path = blender::tests::flags_test_asset_dir() +
SEP_STR + golden_stl;
97 bool are_equal = output_str == golden_str;
99 printf(
"failing test output in %s\n", out_file_path.c_str());
101 ASSERT_TRUE(are_equal);
103 BLI_delete(out_file_path.c_str(),
false,
false);
112 compare_to_golden(
"io_tests" SEP_STR "blend_geometry" SEP_STR "all_tris.blend",
118 compare_to_golden(
"io_tests" SEP_STR "blend_geometry" SEP_STR "all_quads.blend",
124 compare_to_golden(
"io_tests" SEP_STR "blend_geometry" SEP_STR "non_uniform_scale.blend",
130 compare_to_golden(
"io_tests" SEP_STR "blend_geometry" SEP_STR "cubes_positioned.blend",
void BKE_tempdir_init(const char *userdir)
const char * BKE_tempdir_base() ATTR_WARN_UNUSED_RESULT ATTR_RETURNS_NONNULL
void BKE_tempdir_session_purge()
File and directory operations.
int BLI_delete(const char *path, bool dir, bool recursive) ATTR_NONNULL()
void * BLI_file_read_text_as_mem(const char *filepath, size_t pad_bytes, size_t *r_size)
void void void const char * BLI_path_basename(const char *path) ATTR_NONNULL(1) ATTR_WARN_UNUSED_RESULT
#define STRNCPY(dst, src)
external readfile function prototypes.
Read Guarded memory(de)allocation.
virtual void depsgraph_create(eEvaluationMode depsgraph_evaluation_mode)
bool blendfile_load(const char *filepath)
struct Depsgraph * depsgraph
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)
void MEM_freeN(void *vmemh)
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)