This commit is contained in:
2026-03-25 19:20:25 +03:00
parent 433afeaaa3
commit cebe84bce1
10 changed files with 2323 additions and 16 deletions
+2 -2
View File
@@ -98,12 +98,12 @@ func TestGenerateTypeScript_QuantizedFloats(t *testing.T) {
code := string(src)
// Check 8-bit quantization (using camelCase field names)
if !strings.Contains(code, "Math.round((this.q8 - (0)) / (100 - (0)) * 255)") {
if !strings.Contains(code, "Math.trunc((this.q8 - (0)) / (100 - (0)) * 255)") {
t.Error("Missing 8-bit quantization code")
}
// Check 16-bit quantization (using camelCase field names)
if !strings.Contains(code, "Math.round((this.q16 - (-500)) / (500 - (-500)) * 65535)") {
if !strings.Contains(code, "Math.trunc((this.q16 - (-500)) / (500 - (-500)) * 65535)") {
t.Error("Missing 16-bit quantization code")
}