Welcome to mirror list, hosted at ThFree Co, Russian Federation.

mr_IN_test.go « mr_IN - github.com/gohugoio/locales.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 7ac7bbb5fd600a71854018be90d732ed09ee51db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package mr_IN

import "testing"

func TestGrouping(t *testing.T) {

	tests := []struct {
		num      float64
		v        uint64
		expected string
	}{
		{
			num:      1123456.5643,
			v:        2,
			expected: "11,23,456.56",
		},
	}

	trans := New()

	for _, tt := range tests {
		s := string(trans.FmtNumber(tt.num, tt.v))
		if s != tt.expected {
			t.Errorf("Expected '%s' Got '%s", tt.expected, s)
		}
	}
}