验证 tooldata reset 保留索引边界
This commit is contained in:
@@ -383,6 +383,16 @@ int main() {
|
||||
reloaded.offset.tran.z != 3.5 || reloaded.diameter != 8.0) {
|
||||
return 14;
|
||||
}
|
||||
tooldata_last_index_set(12);
|
||||
tooldata_reset();
|
||||
// LinuxCNC src/emc/tooldata/tooldata_mmap.cc clears table entries in
|
||||
// tooldata_reset() without changing the mmap header last_index.
|
||||
if (tooldata_last_index_get() != 12) {
|
||||
return 78;
|
||||
}
|
||||
if (tooldata_find_index_for_tool(7) != -1) {
|
||||
return 79;
|
||||
}
|
||||
|
||||
tooldata_init(false);
|
||||
std::string nonrandom_path_template = make_temp_path("cnc_tooldata_nonrandom_probe_XXXXXX");
|
||||
|
||||
Reference in New Issue
Block a user