slow_tests: fix asm_test.amd64.v (#24451)

This commit is contained in:
Mike 2025-05-10 20:55:15 +03:00 committed by GitHub
parent 00ef1a6c52
commit f3baaa0fb8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -100,7 +100,7 @@ fn test_inline_asm() {
assert util.add(8, 9, 34, 7) == 58 // test .amd64.v imported files
mut o := Manu{}
mut o := &Manu{}
asm amd64 {
mov eax, 0
cpuid
@ -108,7 +108,7 @@ fn test_inline_asm() {
=d (o.edx) as edx0
=c (o.ecx) as ecx0
}
o.str()
assert o.str()[0].is_capital()
}
@[packed]
@ -120,11 +120,11 @@ mut:
zero u8 // for string
}
fn (m Manu) str() string {
fn (m &Manu) str() string {
return unsafe {
string{
str: &u8(&m)
len: 24
str: m
len: 12
is_lit: 1
}
}