mirror of
				https://gitlab.alpinelinux.org/alpine/aports.git
				synced 2025-10-31 00:12:05 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			23 lines
		
	
	
		
			920 B
		
	
	
	
		
			Diff
		
	
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
		
			920 B
		
	
	
	
		
			Diff
		
	
	
	
	
	
| diff --git a/enums_test.go b/enums_test.go
 | |
| index dbae10d..ca5f189 100644
 | |
| --- a/enums_test.go
 | |
| +++ b/enums_test.go
 | |
| @@ -2,6 +2,7 @@ package swag
 | |
|  
 | |
|  import (
 | |
|  	"encoding/json"
 | |
| +	"math"
 | |
|  	"os"
 | |
|  	"path/filepath"
 | |
|  	"testing"
 | |
| @@ -21,7 +22,8 @@ func TestParseGlobalEnums(t *testing.T) {
 | |
|  	assert.NoError(t, err)
 | |
|  	assert.Equal(t, string(expected), string(b))
 | |
|  	constsPath := "github.com/swaggo/swag/testdata/enums/consts"
 | |
| -	assert.Equal(t, 64, p.packages.packages[constsPath].ConstTable["uintSize"].Value)
 | |
| +	bitsizeHostUint := int(math.Round(math.Log2(float64(^uintptr(0)))))
 | |
| +	assert.Equal(t, bitsizeHostUint, p.packages.packages[constsPath].ConstTable["uintSize"].Value)
 | |
|  	assert.Equal(t, int32(62), p.packages.packages[constsPath].ConstTable["maxBase"].Value)
 | |
|  	assert.Equal(t, 8, p.packages.packages[constsPath].ConstTable["shlByLen"].Value)
 | |
|  	assert.Equal(t, 255, p.packages.packages[constsPath].ConstTable["hexnum"].Value)
 |