github.com/lmorg/murex@v0.0.0-20240217211045-e081c89cd4ef/builtins/core/mkarray/consts_test.go (about)

     1  package mkarray
     2  
     3  import (
     4  	"strings"
     5  	"testing"
     6  
     7  	"github.com/lmorg/murex/test/count"
     8  )
     9  
    10  func TestConsts(t *testing.T) {
    11  	for i, m := range mapRanges {
    12  		for element := range m {
    13  
    14  			count.Tests(t, len(m))
    15  
    16  			if element != strings.ToLower(element) {
    17  				t.Errorf("mapRange contains a non-lowercase element")
    18  				t.Log("  mapRange:", i)
    19  				t.Log("  map:     ", m)
    20  				t.Log("  element: ", element)
    21  				t.Log("  All elements in a mapRange should be lower case for performance reasons")
    22  			}
    23  		}
    24  	}
    25  }