Skip to content

Commit 47b5ee8

Browse files
committed
fix tests
1 parent e1ae25b commit 47b5ee8

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

crates/datis-core/src/station.rs

+10-10
Original file line numberDiff line numberDiff line change
@@ -758,8 +758,8 @@ mod test {
758758
};
759759

760760
let report = station.generate_report(26).await.unwrap().unwrap();
761-
assert_eq!(report.spoken, "<speak version=\"1.0\" xml:lang=\"en\">\nThis is Kutaisi information Alpha. | Runway in use is ZERO 4. | Traffic frequency 2 4 NINER DECIMAL 5. | <phoneme alphabet=\"ipa\" ph=\"w&#618;nd\">Wind</phoneme> 3 3 ZERO at 5 knots. | Temperature 2 2 celcius. | ALTIMETER 2 NINER NINER 5. | REMARKS. | 1 ZERO 1 4 hectopascal. | QFE 2 NINER NINER 5 <break time=\"500ms\" /> or 1 ZERO 1 4. | End information Alpha.\n</speak>");
762-
assert_eq!(report.textual, "This is Kutaisi information Alpha. Runway in use is 04. Traffic frequency 249.5. Wind 330 at 5 knots. Temperature 22 celcius. ALTIMETER 2995. REMARKS. 1014 hectopascal. QFE 2995 or 1014. End information Alpha.");
761+
assert_eq!(report.spoken, "<speak version=\"1.0\" xml:lang=\"en\">\nThis is Kutaisi information Alpha. | Runway in use is ZERO 4. | Traffic frequency 2 4 NINER DECIMAL 5. | <phoneme alphabet=\"ipa\" ph=\"w&#618;nd\">Wind</phoneme> 3 3 ZERO at 5 knots. | Temperature 2 2 celcius. | ALTIMETER 2 NINER NINER 7. | REMARKS. | 1 ZERO 1 5 hectopascal. | QFE 2 NINER NINER 7 <break time=\"500ms\" /> or 1 ZERO 1 5. | End information Alpha.\n</speak>");
762+
assert_eq!(report.textual, "This is Kutaisi information Alpha. Runway in use is 04. Traffic frequency 249.5. Wind 330 at 5 knots. Temperature 22 celcius. ALTIMETER 2997. REMARKS. 1015 hectopascal. QFE 2997 or 1015. End information Alpha.");
763763
}
764764

765765
#[tokio::test]
@@ -783,8 +783,8 @@ mod test {
783783
};
784784

785785
let report = station.generate_report(26).await.unwrap().unwrap();
786-
assert_eq!(report.spoken, "<speak version=\"1.0\" xml:lang=\"en\">\nThis is Kutaisi information Papa. | Runway in use is ZERO 4. | Traffic frequency 2 4 NINER DECIMAL 5. | <phoneme alphabet=\"ipa\" ph=\"w&#618;nd\">Wind</phoneme> 3 3 ZERO at 5 knots. | Temperature 2 2 celcius. | ALTIMETER 2 NINER NINER 5. | REMARKS. | 1 ZERO 1 4 hectopascal. | QFE 2 NINER NINER 5 <break time=\"500ms\" /> or 1 ZERO 1 4. | End information Papa.\n</speak>");
787-
assert_eq!(report.textual, "This is Kutaisi information Papa. Runway in use is 04. Traffic frequency 249.5. Wind 330 at 5 knots. Temperature 22 celcius. ALTIMETER 2995. REMARKS. 1014 hectopascal. QFE 2995 or 1014. End information Papa.");
786+
assert_eq!(report.spoken, "<speak version=\"1.0\" xml:lang=\"en\">\nThis is Kutaisi information Papa. | Runway in use is ZERO 4. | Traffic frequency 2 4 NINER DECIMAL 5. | <phoneme alphabet=\"ipa\" ph=\"w&#618;nd\">Wind</phoneme> 3 3 ZERO at 5 knots. | Temperature 2 2 celcius. | ALTIMETER 2 NINER NINER 7. | REMARKS. | 1 ZERO 1 5 hectopascal. | QFE 2 NINER NINER 7 <break time=\"500ms\" /> or 1 ZERO 1 5. | End information Papa.\n</speak>");
787+
assert_eq!(report.textual, "This is Kutaisi information Papa. Runway in use is 04. Traffic frequency 249.5. Wind 330 at 5 knots. Temperature 22 celcius. ALTIMETER 2997. REMARKS. 1015 hectopascal. QFE 2997 or 1015. End information Papa.");
788788
}
789789

790790
#[tokio::test]
@@ -808,8 +808,8 @@ mod test {
808808
};
809809

810810
let report = station.generate_report(26).await.unwrap().unwrap();
811-
assert_eq!(report.spoken, "<speak version=\"1.0\" xml:lang=\"en\">\nThis is Kutaisi information Quebec. | Runway in use is ZERO 4. | Traffic frequency 2 4 NINER DECIMAL 5. | <phoneme alphabet=\"ipa\" ph=\"w&#618;nd\">Wind</phoneme> 3 3 ZERO at 5 knots. | Temperature 2 2 celcius. | ALTIMETER 2 NINER NINER 5. | REMARKS. | 1 ZERO 1 4 hectopascal. | QFE 2 NINER NINER 5 <break time=\"500ms\" /> or 1 ZERO 1 4. | End information Quebec.\n</speak>");
812-
assert_eq!(report.textual, "This is Kutaisi information Quebec. Runway in use is 04. Traffic frequency 249.5. Wind 330 at 5 knots. Temperature 22 celcius. ALTIMETER 2995. REMARKS. 1014 hectopascal. QFE 2995 or 1014. End information Quebec.");
811+
assert_eq!(report.spoken, "<speak version=\"1.0\" xml:lang=\"en\">\nThis is Kutaisi information Quebec. | Runway in use is ZERO 4. | Traffic frequency 2 4 NINER DECIMAL 5. | <phoneme alphabet=\"ipa\" ph=\"w&#618;nd\">Wind</phoneme> 3 3 ZERO at 5 knots. | Temperature 2 2 celcius. | ALTIMETER 2 NINER NINER 7. | REMARKS. | 1 ZERO 1 5 hectopascal. | QFE 2 NINER NINER 7 <break time=\"500ms\" /> or 1 ZERO 1 5. | End information Quebec.\n</speak>");
812+
assert_eq!(report.textual, "This is Kutaisi information Quebec. Runway in use is 04. Traffic frequency 249.5. Wind 330 at 5 knots. Temperature 22 celcius. ALTIMETER 2997. REMARKS. 1015 hectopascal. QFE 2997 or 1015. End information Quebec.");
813813
}
814814

815815
#[test]
@@ -838,8 +838,8 @@ mod test {
838838
};
839839

840840
let report = station.generate_report(26).await.unwrap().unwrap();
841-
assert_eq!(report.spoken, "<speak version=\"1.0\" xml:lang=\"en\">\n99, | Stennis\'s <phoneme alphabet=\"ipa\" ph=\"w&#618;nd\">wind</phoneme> 3 3 ZERO at 5 knots, | altimeter 3 ZERO ZERO 3, | CASE 1, | BRC 1 8 ZERO, | expected final heading 1 7 1, | report initial.\n</speak>");
842-
assert_eq!(report.textual, "99, Stennis\'s wind 330 at 5 knots, altimeter 3003, CASE 1, BRC 180, expected final heading 171, report initial.");
841+
assert_eq!(report.spoken, "<speak version=\"1.0\" xml:lang=\"en\">\n99, | Stennis's <phoneme alphabet=\"ipa\" ph=\"w&#618;nd\">wind</phoneme> 3 3 ZERO at 5 knots, | ALTIMETER 3 ZERO ZERO 5. | CASE 1, | BRC 1 8 ZERO, | expected final heading 1 7 1, | report initial.\n</speak>");
842+
assert_eq!(report.textual, "99, Stennis's wind 330 at 5 knots, ALTIMETER 3005. CASE 1, BRC 180, expected final heading 171, report initial.");
843843
}
844844

845845
#[tokio::test]
@@ -883,7 +883,7 @@ mod test {
883883
};
884884

885885
let report = station.generate_report(26).await.unwrap().unwrap();
886-
assert_eq!(report.spoken, "<speak version=\"1.0\" xml:lang=\"en\">\nThis is weather station Mountain Range information Papa. | <phoneme alphabet=\"ipa\" ph=\"w&#618;nd\">Wind</phoneme> 3 3 ZERO at 5 knots. | Temperature 2 2 celcius. | ALTIMETER 2 NINER NINER 5. | REMARKS. | 1 ZERO 1 4 hectopascal. | QFE 2 NINER NINER 5 <break time=\"500ms\" /> or 1 ZERO 1 4. | End information Papa.\n</speak>");
887-
assert_eq!(report.textual, "This is weather station Mountain Range information Papa. Wind 330 at 5 knots. Temperature 22 celcius. ALTIMETER 2995. REMARKS. 1014 hectopascal. QFE 2995 or 1014. End information Papa.");
886+
assert_eq!(report.spoken, "<speak version=\"1.0\" xml:lang=\"en\">\nThis is weather station Mountain Range information Papa. | <phoneme alphabet=\"ipa\" ph=\"w&#618;nd\">Wind</phoneme> 3 3 ZERO at 5 knots. | Temperature 2 2 celcius. | ALTIMETER 2 NINER NINER 7. | REMARKS. | 1 ZERO 1 5 hectopascal. | QFE 2 NINER NINER 7 <break time=\"500ms\" /> or 1 ZERO 1 5. | End information Papa.\n</speak>");
887+
assert_eq!(report.textual, "This is weather station Mountain Range information Papa. Wind 330 at 5 knots. Temperature 22 celcius. ALTIMETER 2997. REMARKS. 1015 hectopascal. QFE 2997 or 1015. End information Papa.");
888888
}
889889
}

0 commit comments

Comments
 (0)