MCPcopy Create free account
hub / github.com/driangle/taskmd / TestIsNumeric

Function TestIsNumeric

sdk/go/parser/markdown_test.go:690–708  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

688}
689
690func TestIsNumeric(t *testing.T) {
691 tests := []struct {
692 input string
693 want bool
694 }{
695 {"123", true},
696 {"0", true},
697 {"", false},
698 {"12a", false},
699 {"abc", false},
700 }
701 for _, tt := range tests {
702 t.Run(tt.input, func(t *testing.T) {
703 if got := isNumeric(tt.input); got != tt.want {
704 t.Errorf("isNumeric(%q) = %v, want %v", tt.input, got, tt.want)
705 }
706 })
707 }
708}
709
710func TestIsAlphanumericID(t *testing.T) {
711 tests := []struct {

Callers

nothing calls this directly

Calls 1

isNumericFunction · 0.85

Tested by

no test coverage detected