Skip to content

Commit

Permalink
Add comments to test
Browse files Browse the repository at this point in the history
  • Loading branch information
Granddave committed Dec 22, 2023
1 parent 128a3b7 commit e99e25f
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/assembler/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -641,6 +641,7 @@ mod tests {
),
),
(
// Immediate - hex
"LDA #$C8",
ASTInstructionNode::new(
ASTMnemonic::LDA,
Expand All @@ -649,6 +650,7 @@ mod tests {
),
),
(
// Immediate - decimal
"LDA #128",
ASTInstructionNode::new(
ASTMnemonic::LDA,
Expand All @@ -657,6 +659,7 @@ mod tests {
),
),
(
// Absolute - hex
"ADC $BEEF",
ASTInstructionNode::new(
ASTMnemonic::ADC,
Expand All @@ -674,6 +677,7 @@ mod tests {
),
),
(
// Absolute - decimal
"ADC 65535",
ASTInstructionNode::new(
ASTMnemonic::ADC,
Expand All @@ -682,6 +686,7 @@ mod tests {
),
),
(
// ZeroPage - hex
"ADC $C8",
ASTInstructionNode::new(
ASTMnemonic::ADC,
Expand All @@ -699,6 +704,7 @@ mod tests {
),
),
(
// ZeroPage - decimal
"ADC 128",
ASTInstructionNode::new(
ASTMnemonic::ADC,
Expand All @@ -707,6 +713,7 @@ mod tests {
),
),
(
// ZeroPageX - hex
"INC $C8,X",
ASTInstructionNode::new(
ASTMnemonic::INC,
Expand All @@ -715,6 +722,7 @@ mod tests {
),
),
(
// ZeroPageX - decimal
"INC 128,X",
ASTInstructionNode::new(
ASTMnemonic::INC,
Expand All @@ -723,6 +731,7 @@ mod tests {
),
),
(
// ZeroPageY - hex
"LDX $C8,Y",
ASTInstructionNode::new(
ASTMnemonic::LDX,
Expand All @@ -731,6 +740,7 @@ mod tests {
),
),
(
// ZeroPageY - decimal
"LDX 128,Y",
ASTInstructionNode::new(
ASTMnemonic::LDX,
Expand All @@ -739,6 +749,7 @@ mod tests {
),
),
(
// AbsoluteX - hex
"CMP $00EF,X",
ASTInstructionNode::new(
ASTMnemonic::CMP,
Expand All @@ -747,6 +758,7 @@ mod tests {
),
),
(
// AbsoluteX - decimal
"CMP 65535,X",
ASTInstructionNode::new(
ASTMnemonic::CMP,
Expand All @@ -755,6 +767,7 @@ mod tests {
),
),
(
// AbsoluteY - decimal
"EOR 65535,Y",
ASTInstructionNode::new(
ASTMnemonic::EOR,
Expand All @@ -763,6 +776,7 @@ mod tests {
),
),
(
// Relative - hex
"BEQ $03",
ASTInstructionNode::new(
ASTMnemonic::BEQ,
Expand All @@ -771,6 +785,7 @@ mod tests {
),
),
(
// Relative - decimal
"BEQ 3",
ASTInstructionNode::new(
ASTMnemonic::BEQ,
Expand All @@ -779,6 +794,7 @@ mod tests {
),
),
(
// Indirect - hex
"JMP ($BEEF)",
ASTInstructionNode::new(
ASTMnemonic::JMP,
Expand All @@ -787,6 +803,7 @@ mod tests {
),
),
(
// Indirect - decimal
"JMP (65535)",
ASTInstructionNode::new(
ASTMnemonic::JMP,
Expand All @@ -795,6 +812,7 @@ mod tests {
),
),
(
// Indirect indexed X - hex
"EOR ($C8,X)",
ASTInstructionNode::new(
ASTMnemonic::EOR,
Expand All @@ -803,6 +821,7 @@ mod tests {
),
),
(
// Indirect indexed X - decimal
"EOR (128,X)",
ASTInstructionNode::new(
ASTMnemonic::EOR,
Expand All @@ -811,6 +830,7 @@ mod tests {
),
),
(
// Indirect indexed Y - hex
"LDA ($C8),Y",
ASTInstructionNode::new(
ASTMnemonic::LDA,
Expand All @@ -819,6 +839,7 @@ mod tests {
),
),
(
// Indirect indexed Y - decimal
"LDA (128),Y",
ASTInstructionNode::new(
ASTMnemonic::LDA,
Expand All @@ -827,6 +848,7 @@ mod tests {
),
),
(
// Implied
"BRK",
ASTInstructionNode::new(
ASTMnemonic::BRK,
Expand All @@ -835,6 +857,7 @@ mod tests {
),
),
(
// Accumulator
"LSR",
ASTInstructionNode::new(
ASTMnemonic::LSR,
Expand Down

0 comments on commit e99e25f

Please sign in to comment.