Debian Codegraph @

test/geo_test.go

raw symbols ◀ ▶ SCIP
1 Debian patch touch this file
1 package test
2
3 import (
4 "testing"
5
6 "github.com/icrowley/fake"
7 )
8
9 func TestGeo(t *testing.T) {
10 for _, lang := range fake.GetLangs() {
11 fake.SetLang(lang)
12
•13 // f := fake.Latitute()
14 // if f == 0 {
15 // t.Errorf("Latitude failed with lang %s", lang)
16 // }
17 //
18 // i := fake.LatitudeDegress()
19 // if i < -180 || i > 180 {
20 // t.Errorf("LatitudeDegress failed with lang %s", lang)
21 // }
22
•23 i := fake.LatitudeMinutes()
24 if i < 0 || i >= 60 {
25 t.Errorf("LatitudeMinutes failed with lang %s", lang)
26 }
27
28 i = fake.LatitudeSeconds()
29 if i < 0 || i >= 60 {
30 t.Errorf("LatitudeSeconds failed with lang %s", lang)
31 }
32
33 s := fake.LatitudeDirection()
34 if s != "N" && s != "S" {
35 t.Errorf("LatitudeDirection failed with lang %s", lang)
36 }
37
•38 f := fake.Longitude()
39 if f == 0 {
40 t.Errorf("Longitude failed with lang %s", lang)
41 }
42
43 i = fake.LongitudeDegrees()
44 if i < -180 || i > 180 {
45 t.Errorf("LongitudeDegrees failed with lang %s", lang)
46 }
47
48 i = fake.LongitudeMinutes()
49 if i < 0 || i >= 60 {
50 t.Errorf("LongitudeMinutes failed with lang %s", lang)
51 }
52
53 i = fake.LongitudeSeconds()
54 if i < 0 || i >= 60 {
55 t.Errorf("LongitudeSeconds failed with lang %s", lang)
56 }
57
58 s = fake.LongitudeDirection()
59 if s != "W" && s != "E" {
60 t.Errorf("LongitudeDirection failed with lang %s", lang)
61 }
62 }
63 }