// UEB tests for the basic mathml tags
// These are additional tests from other sources
// Those labeled with "aph_" come from the APH lessons:
// https://uebmath.aphtech.org/
use crate::common::*;
// Extra tests targeted at special cases in MathCAT
#[test]
fn overscript_grouping_aph_5_4_8() {
// this test was added because #220 (failed to add grouping around overscript)
let expr = "";
test_braille("UEB", expr, "⠰⠰⠣⠠⠠⠍⠝⠜⠨⠔⠳⠺⠗⠕");
}
#[test]
fn word_symbol_aph_6_7_5() {
// this test was added because ≟ (U+225F) uses a 'G1 Word mode' char, so is different than others
let expr = "";
test_braille("UEB", expr, "⠼⠙⠐⠖⠼⠑⠀⠰⠰⠦⠻⠐⠶⠀⠼⠁⠃");
}
#[test]
fn blank_aph_7_1_ex5() {
// this test was added because #153 (both the blank and spaces around "::")
let expr = "";
test_braille("UEB", expr, "⠼⠉⠒⠼⠁⠑⠀⠒⠒⠀⠼⠋⠚⠒⠨⠤");
}
#[test]
fn word_symbol_aph_10_3_11() {
// this test was added because ⊻ (U+22bb) uses a 'G1 Word mode' char, so is different than others
let expr = "";
test_braille("UEB", expr, "⠰⠰⠏⠈⠖⠠⠱⠟");
}
// Extra tests targeted at special cases in MathCAT
#[test]
fn number_space_before() {
let expr = "";
test_braille("UEB", expr, "⠀⠼⠃");
}
#[test]
fn number_space_after() {
let expr = "";
test_braille("UEB", expr, "⠼⠃⠀");
}
#[test]
fn number_space_before_and_after() {
let expr = "";
test_braille("UEB", expr, "⠀⠼⠃⠀");
}
#[test]
fn not_number_space_blocks() {
// https://github.com/NSoiffer/MathCAT/issues/144
let expr = "";
test_braille("UEB", expr, "⠼⠁⠃⠉⠀⠼⠙⠑⠋");
}
#[test]
fn dot_above_bug_204() {
// https://github.com/NSoiffer/MathCAT/issues/204
let expr = "";
test_braille("UEB", expr, "⠼⠚⠲⠣⠼⠋⠜⠘⠲");
}
#[test]
fn tilde_prefix_bug_244() {
// https://github.com/NSoiffer/MathCAT/issues/244
let expr = "";
test_braille("UEB", expr, "⠈⠔⠏");
}
#[test]
fn double_tilde_prefix_bug_244() {
// This is a a MathJax encoding of a double tilde -- see test Nemeth::tilde_137_3_mathjax
let expr = "";
test_braille("UEB", expr, "⠈⠔⠈⠔⠏");
}
#[test]
fn space_hack_between_digits() {
// https://github.com/NSoiffer/MathCAT/issues/144
let expr = "";
test_braille("UEB", expr, "⠼⠁⠀⠼⠉⠀⠼⠑");
}
#[test]
fn space_hack_around_operator() {
// https://github.com/NSoiffer/MathCAT/issues/144
let expr = "";
test_braille("UEB", expr, "⠰⠽⠀⠐⠶⠀⠼⠑");
}
#[test]
fn forced_g1_symbol_mode() {
// A forced G1 should not count against starting in G2 mode
// This is issue #170 -- surprisingly not tested by other tests
let expr = "";
test_braille("UEB", expr, "⠰⠮⠼⠉⠭⠔⠼⠃⠰⠙⠭");
}
// extra tests targeted at contractions based on function names
#[test]
fn contractions_1() {
let expr = "";
// Note: "arccos" does not use the "cc" contraction -- RUEB 10.6.5 lists "arccosine" without the contraction
test_braille("UEB", expr, "⠎⠑⠡⠀⠭⠐⠖⠉⠕⠩⠀⠽⠐⠖⠜⠉⠉⠕⠎⠀⠰⠞");
}
#[test]
fn contractions_2() {
let expr = "";
test_braille("UEB", expr, "⠅⠻⠀⠰⠓");
}
#[test]
fn contractions_3() {
let expr = "";
test_braille("UEB", expr, "⠜⠛⠥⠰⠞⠐⠣⠋⠐⠜");
}
#[test]
fn contractions_4() {
let expr = "";
test_braille("UEB", expr, "⠻⠗⠕⠗⠀⠋⠥⠝⠉⠰⠝⠀⠻⠋");
}
#[test]
fn contractions_5() {
let expr = "";
test_braille("UEB", expr, "⠠⠗⠂⠇⠐⠣⠵⠐⠜");
}
#[test]
fn caps_bug_279() {
let expr = "";
test_braille("UEB", expr, "⠰⠰⠷⠠⠠⠁⠃⠨⠌⠠⠃⠾");
}
#[test]
fn caps_bug_295() {
let expr = "
";
test_braille("UEB", expr, "⠠⠠⠠⠏⠟⠐⠖⠟⠗⠀⠐⠶⠀⠗⠎⠐⠖⠟⠗⠠⠄");
}