예제 #1
0
def instr_descr(phase_name: str, name: str) -> InstructionDocumentation:
    return InstructionDocumentationWithConstantValues(
        name,
        single_line_description_that_identifies_instruction_and_section(phase_name,
                                                                        name),
        '',
        [])
예제 #2
0
 def test_with_main_description_rest(self):
     description = InstructionDocumentationWithConstantValues('instruction name',
                                                              'single line description',
                                                              'main description rest',
                                                              [])
     actual = sut.instruction_doc_section_contents_constructor(description).apply(CONSTRUCTION_ENVIRONMENT)
     struct_check.is_section_contents.apply(self, actual)
예제 #3
0
 def test(self):
     actual = sut.instruction_set_list_item(InstructionDocumentationWithConstantValues('instruction name',
                                                                                       'single line description',
                                                                                       '',
                                                                                       []),
                                            text)
     struct_check.is_list_item.apply(self, actual)
예제 #4
0
 def test_with_invokation_variants(self):
     description = InstructionDocumentationWithConstantValues(
         'instruction name',
         'single line description',
         'main description rest',
         [InvokationVariant('invokation variant syntax',
                            paras('invokation variant description rest'))])
     actual = sut.instruction_doc_section_contents_constructor(description).apply(CONSTRUCTION_ENVIRONMENT)
     struct_check.is_section_contents.apply(self, actual)
예제 #5
0
 def test_with_main_description_rest_sub_sections(self):
     description = InstructionDocumentationWithConstantValues(
         'instruction name',
         'single line description',
         'main description rest',
         [],
         main_description_rest_sub_sections=[
             docs.section('main description rest sub section header',
                          docs.paras('Sub section paragraphs'))
         ]
     )
     actual = sut.instruction_doc_section_contents_constructor(description).apply(CONSTRUCTION_ENVIRONMENT)
     struct_check.is_section_contents.apply(self, actual)