From 9fd97e71d0330d6b6509f28686cf53825bc80941 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Wed, 5 Nov 2025 20:13:19 +0900 Subject: treewide: fit test untyped int literals in 32-bit This enables hakurei test suite to run on 32-bit targets. Signed-off-by: Ophestra --- internal/outcome/dispatcher_test.go | 2 +- internal/outcome/hsu.go | 6 +++--- internal/outcome/main_test.go | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'internal/outcome') diff --git a/internal/outcome/dispatcher_test.go b/internal/outcome/dispatcher_test.go index 41a2a31a..09754b94 100644 --- a/internal/outcome/dispatcher_test.go +++ b/internal/outcome/dispatcher_test.go @@ -36,7 +36,7 @@ func call(name string, args stub.ExpectArgs, ret any, err error) stub.Call { const ( // checkExpectUid is the uid value used by checkOpBehaviour to initialise [system.I]. - checkExpectUid = 0xcafebabe + checkExpectUid = 0xcafe // wantAutoEtcPrefix is the autoetc prefix corresponding to checkExpectInstanceId. wantAutoEtcPrefix = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" // wantInstancePrefix is the SharePath corresponding to checkExpectInstanceId. diff --git a/internal/outcome/hsu.go b/internal/outcome/hsu.go index 3047a2e9..c1be6761 100644 --- a/internal/outcome/hsu.go +++ b/internal/outcome/hsu.go @@ -86,12 +86,12 @@ func (h *Hsu) MustID(msg message.Msg) int { msg.Verbose("*"+fallback, err) } os.Exit(1) - return -0xdeadbeef // not reached + return -0xbad // not reached } else if m, ok := message.GetMessage(err); ok { log.Fatal(m) - return -0xdeadbeef // not reached + return -0xbad // not reached } else { log.Fatalln(fallback, err) - return -0xdeadbeef // not reached + return -0xbad // not reached } } diff --git a/internal/outcome/main_test.go b/internal/outcome/main_test.go index 861478d1..e5b9af1e 100644 --- a/internal/outcome/main_test.go +++ b/internal/outcome/main_test.go @@ -701,7 +701,7 @@ type stubNixOS struct { } func (k *stubNixOS) getppid() int { return 0xbad } -func (k *stubNixOS) getpid() int { return 0xdeadbeef } +func (k *stubNixOS) getpid() int { return 0xdead } func (k *stubNixOS) getuid() int { return 1971 } func (k *stubNixOS) getgid() int { return 100 } -- cgit v1.3.1