Example #1
0
 def testGetFormatted(self):
     code_entry = raw_doc.RawCodeEntry(self.code_tok)
     b = raw_doc.RawBrief(self.brief_tok, raw_doc.RawText([self.brief_tok]))
     code_entry = raw_doc.RawCodeEntry(self.code_tok, [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(self.tok_see, raw_doc.RawText([self.tok_see]))
     ]
     s = raw_doc.RawSignature(self.tok_sig, 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 #2
0
 def testAddSignature(self):
     code_entry = raw_doc.RawCodeEntry(self.code_tok)
     s = raw_doc.RawSignature(
         self.sig_tok,
         raw_doc.RawText([lexer.Token('WORD', 'payload', 0, 0, 0)]))
     code_entry.addSignature(s)
Example #3
0
 def testCreation(self):
     code_entry = raw_doc.RawCodeEntry(self.code_tok)
     self.assertEqual(code_entry.signatures, [])
     self.assertEqual(code_entry.command, '<code entry>')