github.com/cockroachdb/pebble@v1.1.1-0.20240513155919-3622ade60459/internal/constants/constants_test.go (about)

     1  // Copyright 2023 The LevelDB-Go and Pebble Authors. All rights reserved. Use
     2  // of this source code is governed by a BSD-style license that can be found in
     3  // the LICENSE file.
     4  
     5  package constants
     6  
     7  import (
     8  	"math"
     9  	"testing"
    10  
    11  	"github.com/stretchr/testify/require"
    12  )
    13  
    14  func TestConstants(t *testing.T) {
    15  	if math.MaxInt == math.MaxInt64 {
    16  		require.Equal(t, uint64(math.MaxUint32), uint64(MaxUint32OrInt))
    17  	} else {
    18  		require.Equal(t, uint64(math.MaxInt), uint64(MaxUint32OrInt))
    19  	}
    20  }