Fix tests to run on stable

Signed-off-by: trivernis <trivernis@protonmail.com>
pull/9/head
trivernis 4 years ago
parent 7dfa4d8f3e
commit a465a64944
Signed by: Trivernis
GPG Key ID: DFFFCC2C7A02DB45

@ -2,7 +2,7 @@
name = "asciimath-rs"
description = "AsciiMath parser"
repository = "https://github.com/trivernis/asciimath-rs"
version = "0.5.6"
version = "0.5.7"
authors = ["trivernis <trivernis@protonmail.com>"]
edition = "2018"
readme = "README.md"
@ -13,7 +13,7 @@ categories = ["mathematics", "parser-implementations"]
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
charred = "0.3.1"
charred = "0.3.3"
maplit = "1.0.2"
lazy_static = "1.4.0"
htmlescape = "0.3.1"

@ -1,6 +1,3 @@
#![feature(test)]
extern crate test;
#[macro_use]
extern crate maplit;
@ -51,7 +48,6 @@ mod tests {
use crate::tokens::{Function, Grouping, Misc, Operation, Relation, Text, Token};
use crate::utils::Boxed;
use std::fs;
use test::Bencher;
#[test]
fn it_tokenizes_expressions1() {
@ -399,10 +395,4 @@ mod tests {
)
.unwrap();
}
#[bench]
fn bench_tokenizer(b: &mut Bencher) {
let expression = "sqrt 1 in NN implies 2^4 + sum_(k = 1)^3 - ((1),(2)) [[2, 3 + 3],[4, 5]] (((((((nesting)))))))";
b.iter(|| parse(expression.to_string()));
}
}

@ -460,7 +460,7 @@ impl TreeParser {
self.step();
Some(Frac {
top: previous.to_non_enclosed().boxed(),
bottom: self.parse_element().unwrap().to_non_enclosed().boxed(),
bottom: self.parse_element()?.to_non_enclosed().boxed(),
})
} else {
None

Loading…
Cancel
Save