Skip to content

Commit

Permalink
Fix doctests
Browse files Browse the repository at this point in the history
  • Loading branch information
AngheloAlf committed Jan 5, 2025
1 parent 9233a92 commit 1bb6af3
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/rabbitizer/src/instr/instruction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,11 @@ use crate::vram::{Vram, VramOffset};
///
/// ```
/// use rabbitizer::{Instruction, Vram, InstructionFlags, InstructionDisplayFlags};
/// use rabbitizer::isa::IsaVersion;
/// use rabbitizer::opcodes::Opcode;
///
/// let vram = Vram::new(0x80000000);
/// let flags = InstructionFlags::new();
/// let flags = InstructionFlags::new(IsaVersion::MIPS_III, None);
/// let instr = Instruction::new(0x3C088001, vram, flags);
///
/// assert_eq!(instr.opcode(), Opcode::core_lui);
Expand All @@ -54,10 +55,11 @@ use crate::vram::{Vram, VramOffset};
///
/// ```
/// use rabbitizer::{Instruction, Vram, InstructionFlags, InstructionDisplayFlags};
/// use rabbitizer::isa::IsaVersion;
/// use rabbitizer::opcodes::Opcode;
///
/// let vram = Vram::new(0x80000000);
/// let flags = InstructionFlags::new();
/// let flags = InstructionFlags::new(IsaVersion::MIPS_III, None);
///
/// // Specify the same word for both Instruction instances.
/// let word = 0x00025022;
Expand Down Expand Up @@ -246,9 +248,10 @@ impl Instruction {
///
/// ```
/// use rabbitizer::{Instruction, Vram, InstructionFlags, InstructionDisplayFlags};
/// use rabbitizer::isa::IsaVersion;
///
/// let vram = Vram::new(0x80000000);
/// let flags = InstructionFlags::new();
/// let flags = InstructionFlags::new(IsaVersion::MIPS_III, None);
/// let instr = Instruction::new(0x3C088001, vram, flags);
///
/// let display_flags = InstructionDisplayFlags::new();
Expand Down

0 comments on commit 1bb6af3

Please sign in to comment.