def testGetFormatted(self): b = raw_doc.RawBrief(self.brief_tok, raw_doc.RawText([self.brief_tok])) code_entry = raw_doc.RawVariable(self.brief_tok, [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(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) 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)
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)
def testGetFormatted(self): signature = raw_doc.RawSignature(self.tok, self.txt_text) self.assertEqual(signature.getFormatted(self.formatter), '@signature text\n')
def testGetType(self): signature = raw_doc.RawSignature(self.tok, self.txt_text) self.assertEqual(signature.getType(), 'signature')
def testCreation(self): signature = raw_doc.RawSignature(self.tok, self.txt_text) self.assertEqual(signature.text, self.txt_text)
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)