public void GenerateCode() { Word[] expectedWords = WordTest.MakeArray(0x0000); ICodeGeneratorTest.CheckGenerateCode( m_target, expectedWords, "あどでラベルのアドレスに置き換えるために、値が 0x0000 の語が追加される"); }
private void CheckGenerateCode(Int32 value, UInt16 expected, String message) { HexaDecimalConstant target = new HexaDecimalConstant(value); Word[] expectedWords = WordTest.MakeArray(expected); ICodeGeneratorTest.CheckGenerateCode(target, expectedWords, message); }
public void GenerateCode() { const UInt16 Adr = 0xABCD; RegisterOperand DontCareRegister = RegisterOperandTest.GR1; RAdrXOperand target = RAdrXOperand.MakeForUnitTest( DontCareRegister, AdrXOperand.MakeForUnitTest(new HexaDecimalConstant(Adr), DontCareRegister)); Word[] expectedWords = WordTest.MakeArray(Adr); ICodeGeneratorTest.CheckGenerateCode(target, expectedWords, "adr の値がコードとして生成される"); }
public void GenerateCode() { const UInt16 LabelPlaceHolder = 0x0000; ICodeGeneratorTest.CheckGenerateCode( m_constants, WordTest.MakeArray( DecimalValue, HexaDecimalValue, LabelPlaceHolder, AValue, BValue, CValue), "それぞれの Constant のコードが順に生成される"); }
public void GenerateCode() { LabelTable lblTable = new LabelTable(); m_target.GenerateLiteralDc(lblTable); Word[] expectedWords = TestUtils.MakeArray(Word.Zero); ICodeGeneratorTest.CheckGenerateCode( m_target, expectedWords, "オブジェクトコードにラベルのアドレスが入る場所を確保する値 0 の語が追加される"); // RelocatableModule に LabelReference が追加されることは、RelocatableModule のテストで確認する。 }
private void CheckGenerateLiteralDc(IAdrCodeGenerator literal, String expected, String message) { ICodeGeneratorTest.CheckGenerateLiteralDc(literal, expected, message); }
public void GetCodeWordCount() { ICodeGeneratorTest.CheckGetCodeWordCount(m_target, 1, "Literal => 1 語生成する"); }
public void GetCodeWordCount() { ICodeGeneratorTest.CheckGetCodeWordCount(m_target, 1, "AddressConstant => 1 語生成する"); }
private static void CheckAdr(IAdrCodeGenerator expected, IAdrCodeGenerator actual, String message) { ICodeGeneratorTest.CheckIAdrCodeGenerator(expected, actual, message); }
private void CheckGenerateCode(String value, Word[] expectedWords, String message) { StringConstant target = new StringConstant(value); ICodeGeneratorTest.CheckGenerateCode(target, expectedWords, message); }
private void CheckGetCodeWordCount(MachineInstructionOperand target, Int32 expected, String message) { ICodeGeneratorTest.CheckGetCodeWordCount(target, expected, message); }
private void CheckGenerateLiteralDc( MachineInstructionOperand target, String expected, String message) { ICodeGeneratorTest.CheckGenerateLiteralDc(target, expected, message); }
public void GetCodeWordCount() { ICodeGeneratorTest.CheckGetCodeWordCount( m_constants, 1 + 1 + 1 + StringValue.Length, "それぞれの Constant の語数の合計"); }
public void GenerateLiteralDc() { ICodeGeneratorTest.CheckGenerateLiteralDc( m_target, null, "HexaDecimalConstant は DC 命令を生成しない ==> null が返される"); }
private void CheckGetCodeWordCount(String value, Int32 expected, String message) { StringConstant target = new StringConstant(value); ICodeGeneratorTest.CheckGetCodeWordCount(target, expected, message); }
public void GetCodeWordCount() { ICodeGeneratorTest.CheckGetCodeWordCount(m_target, 1, "HexaDecimalConstant => 1 語生成する"); }
private void CheckGenerateCode(AdrXOperand target, UInt16 expected, String message) { Word[] expectedWords = WordTest.MakeArray(expected); ICodeGeneratorTest.CheckGenerateCode(target, expectedWords, message); }