// Other tests for LaTeX generation
use crate::common::*;
#[test]
fn menclose_strikes () {
let expr = r#""#;
test_braille("ASCIIMath", expr, r"\cancel(x)");
}
#[test]
fn menclose_box_and_circle () {
let expr = r#""#;
// box and circle aren't part of ASCIIMath
test_braille("ASCIIMath", expr, r"|overline(underline(x))|");
}
#[test]
fn menclose_sides () {
let expr = r#""#;
test_braille("ASCIIMath", expr, r"|x|overline(underline(x))");
}
#[test]
fn menclose_all_sides() {
let expr = r#""#;
test_braille("ASCIIMath", expr, r"|overline(underline(x))|");
}
#[test]
fn menclose_diagonal_arrows() {
let expr = r#""#;
// arrows aren't part of ASCIIMath
test_braille("ASCIIMath", expr, r"x");
}
#[test]
fn menclose_double_arrows() {
// extra spaces are deliberate -- they shouldn't make a difference
let expr = r#""#;
// arrows aren't part of ASCIIMath
test_braille("ASCIIMath", expr, r"x");
}
#[test]
fn menclose_horiz_and_vert_arrows() {
let expr = r#""#;
// arrows aren't part of ASCIIMath
test_braille("ASCIIMath", expr, r"x");
}
#[test]
fn char_test() {
let expr = r#""#;
test_braille("ASCIIMath", expr, r"bb A, bbb A, CC, cc l, cc P, tt X, fr H, fr z, sf t, x, h");
}
#[test]
fn quadratic_formula() {
let expr = r#""#;
test_braille("ASCIIMath", expr, r"x = (-b+-sqrt(b^2-4ac))/(2a)");
}
#[test]
fn porportional() {
let expr = r#""#;
test_braille("ASCIIMath", expr, r"a prop b");
}
#[test]
fn bracketing() {
let expr = r#""#;
test_braille("ASCIIMath", expr, r"x = <<|__|a-b| __|>>");
}
#[test]
fn dydx() {
let expr = r#""#;
test_braille("ASCIIMath", expr, r"f'(x) = dy/dx");
}
#[test]
fn dqdp() {
let expr = r#""#;
test_braille("ASCIIMath", expr, r"(dq)/(dp)");
}
#[test]
fn norm() {
let expr = r#""#;
test_braille("ASCIIMath", expr, r"norm(vec x)");
}
#[test]
fn above_and_below() {
let expr = r#""#;
test_braille("ASCIIMath", expr, r"ubrace(1+2), obrace(x-y), underset(x->y)(->), overset(x->y)(lArr)");
}
#[test]
fn dots_and_bars() {
let expr = r#""#;
test_braille("ASCIIMath", expr, r"hat x, bar x, ul(x+y), vec bb x, dot x, ddot y");
}
#[test]
fn backslash() {
let expr = r#""#;
test_braille("ASCIIMath", expr, r"a\\b");
}
#[test]
fn text_and_space() {
let expr = r#""#;
test_braille("ASCIIMath", expr, r#"a\ "some text"\ b"#);
}
#[test]
fn mixed_fraction() {
let expr = r#""#;
test_braille("ASCIIMath", expr, r#"2 1/2"#);
}