Beispiel #1
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)
Beispiel #2
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)
Beispiel #3
0
 def processSignatures(self, entry, node):
     for text in node.texts:
         t = lexer.Token('WORD', text, 0, 0, 0)
         raw_text = raw_doc.RawText(translateTokens([t]))
         raw_sig = raw_doc.RawSignature(raw_text)
         entry.addSignature(raw_sig)
Beispiel #4
0
 def testGetFormatted(self):
     signature = raw_doc.RawSignature(self.txt_text)
     self.assertEqual(signature.getFormatted(self.formatter),
                      '@signature text\n')
Beispiel #5
0
 def testGetType(self):
     signature = raw_doc.RawSignature(self.txt_text)
     self.assertEqual(signature.getType(), 'signature')
Beispiel #6
0
 def testCreation(self):
     signature = raw_doc.RawSignature(self.txt_text)
     self.assertEqual(signature.text, self.txt_text)
Beispiel #7
0
 def testAddSignature(self):
     code_entry = raw_doc.RawCodeEntry()
     s = raw_doc.RawSignature(
         raw_doc.RawText([lexer.Token('WORD', 'payload', 0, 0, 0)]))
     code_entry.addSignature(s)