Skip to content

Commit 2172762

Browse files
committed
Post-rebase cleanup of test_decoder_font
1 parent 08734dd commit 2172762

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

generated/api_helper.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ pub mod oft_metrics {
418418
pub fn analyze_font(test_file: &str) -> TestResult<OpentypeMetrics> {
419419
let buffer = std::fs::read(std::path::Path::new(test_file))?;
420420
let mut input = Parser::new(&buffer);
421-
let dat = Decoder14(&mut input)?;
421+
let dat = Decoder_opentype_main(&mut input)?;
422422
// TODO: do we want to collect (and return) any metrics here?
423423
match dat.font.directory {
424424
opentype_font_directory::TTCHeader(multi) => {

generated/codegen_tests.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,10 @@ fn test_decoder_tgz() -> TestResult {
3131

3232
#[test]
3333
fn test_decoder_font() -> TestResult {
34-
let buffer = std::fs::read(std::path::Path::new(&testpath(
34+
let metrics = analyze_font(&testpath(
3535
"../prince/tests/data/fonts/lsansuni.ttf",
36-
)))?;
37-
let mut input = Parser::new(&buffer);
38-
let parsed_data = Decoder_opentype_main(&mut input)?;
39-
show_opentype_stats(&parsed_data);
36+
))?;
37+
show_opentype_stats(&metrics);
4038
Ok(())
4139
}
4240

0 commit comments

Comments
 (0)