]> gitweb.factorcode.org Git - factor.git/blob - extra/metar/metar-tests.factor
tools.scaffold: Add a word to scaffold tests.
[factor.git] / extra / metar / metar-tests.factor
1 USING: metar.private tools.test ;
2
3 { { "RAB05" "E30" "SNB20" "E55" } }
4 [ "RAB05E30SNB20E55" split-recent-weather ] unit-test
5
6 { "calm" } [ "00000KT" parse-wind ] unit-test
7 { "calm" } [ "00000MPS" parse-wind ] unit-test
8 { "from N (360°) at 5 knots (5.8 mph)" } [ "36005KT" parse-wind ] unit-test
9 { "from N (360°) at 5 knots (5.8 mph)" } [ "360/5KT" parse-wind ] unit-test
10 { "from N (360°) at 5 meters per second" } [ "36005MPS" parse-wind ] unit-test
11 { "from N (360°) at 5 meters per second" } [ "360/5MPS" parse-wind ] unit-test
12
13 { "1+1/2 statute miles" } [ "1 1/2SM" parse-visibility ] unit-test
14 { "100m" } [ "0100" parse-visibility ] unit-test
15 { "4.2km" } [ "4200" parse-visibility ] unit-test
16 { "5km" } [ "5000" parse-visibility ] unit-test
17 { "more than 10km" } [ "9999" parse-visibility ] unit-test
18 { "more than 10km north" } [ "9999N" parse-visibility ] unit-test