Files

21 lines
678 B
C++
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// WP-P4-09 Plan A:vde-pmi 模块包消费者 smoke(auto_generate_pmi + 内核数据模型)。
#include "vde_pmi/pmi_export.h"
#include <cstdio>
int main() {
vde::brep::BrepModel body;
vde::brep::PMIModel pmi;
const int generated = vde::drafting::auto_generate_pmi(body, pmi);
vde::brep::PMIAnnotation ann;
ann.type = vde::brep::PMIType::Note;
ann.label = "CONSUMER_NOTE";
const int id = pmi.attach_pmi(ann);
const bool ok = generated == 0 && pmi.count() == 1u && id >= 0;
std::printf("PMI_CONSUMER_%s generated=%d count=%zu note_id=%d\n",
ok ? "PASS" : "FAIL", generated, pmi.count(), id);
return ok ? 0 : 1;
}