MCPcopy Create free account
hub / github.com/cactus-compute/cactus / test_empty_weight_file

Function test_empty_weight_file

tests/test_model_loading.cpp:47–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45}
46
47static bool test_empty_weight_file() {
48 std::string dir = make_temp_dir("empty_weights");
49 write_file(dir + "/config.txt", MINIMAL_CONFIG);
50 write_file(dir + "/vocab.txt", "hello\nworld\n");
51 write_file(dir + "/weights.bin", "");
52 bool ok = expect_init_fails(dir);
53 fs::remove_all(dir);
54 return ok;
55}
56
57static bool test_missing_vocab() {
58 std::string dir = make_temp_dir("missing_vocab");

Callers 1

mainFunction · 0.85

Calls 3

write_fileFunction · 0.85
expect_init_failsFunction · 0.85
make_temp_dirFunction · 0.70

Tested by

no test coverage detected