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 CheckGenerateCode(String value, Word[] expectedWords, String message) { StringConstant target = new StringConstant(value); ICodeGeneratorTest.CheckGenerateCode(target, expectedWords, message); }
private void CheckGenerateCode(AdrXOperand target, UInt16 expected, String message) { Word[] expectedWords = WordTest.MakeArray(expected); ICodeGeneratorTest.CheckGenerateCode(target, expectedWords, message); }