Example #1
0
 def testAddSee(self):
     entry = raw_doc.RawEntry()
     self.assertEqual(entry.sees, [])
     s = raw_doc.RawSee(raw_doc.RawText())
     entry.addSee(s)
     self.assertEqual(len(entry.sees), 1)
     self.assertEqual(entry.sees, [s])
Example #2
0
 def testGetFormatted(self):
     b = raw_doc.RawBrief(raw_doc.RawText([self.brief_tok]))
     entry = raw_doc.RawEntry([b])
     entry.name = raw_doc.RawText([self.name_tok])
     entry.title = raw_doc.RawText([self.title_tok])
     entry.sees = [raw_doc.RawSee(raw_doc.RawText([self.tok_see]))]
     formatter = raw_doc.DoxFormatter()
     msg = ('@<entry> Concept Concept Title\n\n'
            '@brief This is brief.\n\n'
            '@see See\n\n')
     self.assertMultiLineEqual(entry.getFormatted(formatter), msg)
Example #3
0
 def testGetFormatted(self):
     b = raw_doc.RawBrief(raw_doc.RawText([self.brief_tok]))
     code_entry = raw_doc.RawVariable([b])
     code_entry.name = raw_doc.RawText([self.name_tok])
     code_entry.type = raw_doc.RawText([self.type_tok])
     code_entry.sees = [raw_doc.RawSee(raw_doc.RawText([self.tok_see]))]
     s = raw_doc.RawSignature(raw_doc.RawText([self.tok_sig]))
     code_entry.addSignature(s)
     txt = ('@var int var\n\n'
            '@brief This is brief.\n\n'
            '@signature payload\n\n'
            '@see See\n\n')
     self.assertMultiLineEqual(code_entry.getFormatted(self.formatter), txt)
Example #4
0
 def testGetFormatted(self):
     code_entry = raw_doc.RawCodeEntry()
     b = raw_doc.RawBrief(raw_doc.RawText([self.brief_tok]))
     code_entry = raw_doc.RawCodeEntry([b])
     code_entry.name = raw_doc.RawText([self.name_tok])
     code_entry.title = raw_doc.RawText([self.title_tok])
     code_entry.sees = [raw_doc.RawSee(raw_doc.RawText([self.tok_see]))]
     s = raw_doc.RawSignature(raw_doc.RawText([self.tok_sig]))
     code_entry.addSignature(s)
     formatter = raw_doc.DoxFormatter()
     txt = ('@<code entry> Concept Concept Title\n\n'
            '@brief This is brief.\n\n'
            '@signature payload\n\n'
            '@see See\n\n')
     self.assertMultiLineEqual(code_entry.getFormatted(formatter), txt)
Example #5
0
 def processSee(self, entry, node):
     for text in node.texts:
         t = lexer.Token('WORD', translateTypename(text), 0, 0, 0)
         raw_text = raw_doc.RawText(translateTokens([t]))
         entry.addSee(raw_doc.RawSee(raw_text))
Example #6
0
 def testGetFormatted(self):
     see = raw_doc.RawSee(self.txt)
     self.assertEqual(see.getFormatted(self.formatter), '@see aword\n')
Example #7
0
 def testGetType(self):
     see = raw_doc.RawSee(self.txt)
     self.assertEqual(see.getType(), 'see')
Example #8
0
 def testCreation(self):
     see = raw_doc.RawSee(self.txt)
     self.assertEqual(see.text, self.txt)