generateMML( $input );
$this->assertTrue( str_contains( $mathMLtexVC, "merror" ) );
}
public function testSidesetSum() {
$input = "\\sideset{_1^2}{_3^4}\\sum";
$mathMLtexVC = $this->generateMML( $input );
$this->assertStringNotContainsString( "merror", $mathMLtexVC );
$this->assertStringContainsString( "mmultiscripts", $mathMLtexVC );
$this->assertStringContainsString( "", $mathMLtexVC );
$this->assertStringContainsString( ">∑", $mathMLtexVC );
}
public function testSidesetProd() {
$input = "\\sideset{_1^2}{_3^4}\\prod";
$mathMLtexVC = $this->generateMML( $input );
$this->assertStringNotContainsString( "merror", $mathMLtexVC );
$this->assertStringContainsString( "mmultiscripts", $mathMLtexVC );
$this->assertStringContainsString( "", $mathMLtexVC );
$this->assertStringContainsString( ">∏", $mathMLtexVC );
}
public function testSidesetFQ() {
$input = "\\sideset{_1^2}{_3^4}\prod_a^b";
$mathMLtexVC = $this->generateMML( $input );
$this->assertStringNotContainsString( "merror", $mathMLtexVC );
$this->assertStringContainsString( "mmultiscripts", $mathMLtexVC );
$this->assertStringContainsString( "", $mathMLtexVC );
$this->assertStringContainsString( ">∏", $mathMLtexVC );
$this->assertStringContainsString( "a", $mathMLtexVC );
$this->assertStringContainsString( "b", $mathMLtexVC );
$this->assertStringContainsString( "movablelimits", $mathMLtexVC );
}
private function generateMML( $input, $chem = false ) {
$texVC = new TexVC();
$resultT = $texVC->check( $input, [
'debug' => false,
'usemathrm' => false,
'oldtexvc' => false,
'usemhchem' => $chem
] );
return MMLTestUtil::getMMLwrapped( $resultT["input"] ) ?? "";
}
}