File: ordinals_test.go

package info (click to toggle)
golang-github-dustin-go-humanize 0.0~git20151125.0.8929fe9-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 144 kB
  • ctags: 134
  • sloc: makefile: 2
file content (22 lines) | stat: -rw-r--r-- 469 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package humanize

import (
	"testing"
)

func TestOrdinals(t *testing.T) {
	testList{
		{"0", Ordinal(0), "0th"},
		{"1", Ordinal(1), "1st"},
		{"2", Ordinal(2), "2nd"},
		{"3", Ordinal(3), "3rd"},
		{"4", Ordinal(4), "4th"},
		{"10", Ordinal(10), "10th"},
		{"11", Ordinal(11), "11th"},
		{"12", Ordinal(12), "12th"},
		{"13", Ordinal(13), "13th"},
		{"101", Ordinal(101), "101st"},
		{"102", Ordinal(102), "102nd"},
		{"103", Ordinal(103), "103rd"},
	}.validate(t)
}