mirror of
https://github.com/NohamR/Reclass.git
synced 2026-05-10 19:59:21 +00:00
feat: type hints green [bracketed] notation, workspace cleanup, unique naming
- Type inference hints now show value-first with bracketed type in comment green: "0x7ff718570000 [ptr64]", "6, 16 [int32_t×2]" - Raise hint threshold to strong-only (score >= 75%) - Remove Bool inference, widen Int16 range to ±16384 - Workspace: remove dead WorkspaceProxy, fix null deref, debounce search, cache icons, add pinning support - Unique naming: UnnamedClass0/UnnamedEnum1 with global counter - Footer buttons: +10h +100h +1000h replacing +1024 - MCP: project lifecycle API, snapshot provider fix
This commit is contained in:
@@ -125,39 +125,27 @@ private slots:
|
||||
QVERIFY(r[0].kinds[0] == NodeKind::Int16 || r[0].kinds[0] == NodeKind::UInt16);
|
||||
}
|
||||
|
||||
// ── Hex8: bool-like ──
|
||||
void hex8_bool() {
|
||||
// ── Hex8: uint8 ──
|
||||
void hex8_uint() {
|
||||
uint8_t d[1] = {1};
|
||||
auto r = inferTypes(d, 1);
|
||||
QVERIFY(!r.isEmpty());
|
||||
bool foundBool = false;
|
||||
for (const auto& s : r)
|
||||
if (s.kinds.size() == 1 && s.kinds[0] == NodeKind::Bool)
|
||||
foundBool = true;
|
||||
QVERIFY(foundBool);
|
||||
QCOMPARE(r[0].kinds[0], NodeKind::UInt8);
|
||||
}
|
||||
|
||||
// ── formatHint ──
|
||||
void formatHint_strong() {
|
||||
void formatHint_single() {
|
||||
TypeSuggestion s;
|
||||
s.kinds = {NodeKind::Float};
|
||||
s.strength = 3;
|
||||
QCOMPARE(formatHint(s), QStringLiteral("float strong"));
|
||||
}
|
||||
void formatHint_moderate() {
|
||||
TypeSuggestion s;
|
||||
s.kinds = {NodeKind::Float};
|
||||
s.strength = 2;
|
||||
QCOMPARE(formatHint(s), QStringLiteral("float moderate"));
|
||||
QCOMPARE(formatHint(s), QStringLiteral("float"));
|
||||
}
|
||||
void formatHint_split() {
|
||||
TypeSuggestion s;
|
||||
s.kinds = {NodeKind::Float, NodeKind::Float};
|
||||
s.strength = 3;
|
||||
QString h = formatHint(s);
|
||||
QVERIFY(h.contains("float"));
|
||||
QVERIFY(h.contains("2"));
|
||||
QVERIFY(h.endsWith("strong"));
|
||||
QCOMPARE(h, QStringLiteral("float\u00D72"));
|
||||
}
|
||||
|
||||
// ── Denormal rejection ──
|
||||
|
||||
Reference in New Issue
Block a user