Пример #1
0
 def test_STDC_FP_CONTRACT_ON(self):
     """TestPragmaHandlerSTDC: Test FP_CONTRACT ON."""
     myH = PragmaHandler.PragmaHandlerEcho()
     myTokS = [
         PpToken.PpToken('some', 'identifier'),
         PpToken.PpToken(' ', 'whitespace'),
         PpToken.PpToken('pragma', 'identifier'),
         PpToken.PpToken(' ', 'whitespace'),
         PpToken.PpToken('command', 'identifier'),
         PpToken.PpToken('\n', 'whitespace'),
     ]
     self.assertEqual(myH.pragma(myTokS), '#pragma some pragma command\n')
Пример #2
0
 def test_echo_01(self):
     """TestPragmaHandlerEcho: Test isLiteral."""
     myH = PragmaHandler.PragmaHandlerEcho()
     self.assertTrue(myH.isLiteral)
Пример #3
0
 def test_echo_00(self):
     """TestPragmaHandlerEcho: Test replaceTokens."""
     myH = PragmaHandler.PragmaHandlerEcho()
     self.assertNotEqual(myH.replaceTokens, True)