Skip to content

Enums test fails on 32bit #1633

@leso-kn

Description

@leso-kn

Describe the bug
The enums_test.go test fails when run under 32-bit architectures (e.g. x86, armv7, armhf).

To Reproduce
Steps to reproduce the behavior (docker):

  1. docker run --rm -ti -v $PWD:/repo --workdir /repo alpine
  2. apk add go
  3. make test
  4. Tests fail with message:
    enums_test.go:24: 
         	Error Trace:	github.com/swaggo/swag/enums_test.go:24
         	Error:      	Not equal: 
         	            	expected: 64
         	            	actual  : 32
    

Expected behavior
The enums test should pass on 32-bit systems.

Screenshots
-

Your swag version
e.g. 1.8.12

Your go version
e.g. 1.20.6

Desktop (please complete the following information):

  • OS: Alpine Linux
  • Version: edge
  • Tested Architectures: x86_64 (ok), riscv64 (ok), x86 (not ok), armv7 (not ok), armhf (not ok)

Additional context
Explanation: The test fails because it asserts the size of uint against 64, which is only true on 64-bit systems.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions