From c4efaa81d4bf498c721db5cdbf932e7a3bcb0cae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Tue, 21 Nov 2017 22:37:59 +0100 Subject: Implement tests for few more arithmetic instructions --- qtmips_machine/instruction.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'qtmips_machine/instruction.cpp') diff --git a/qtmips_machine/instruction.cpp b/qtmips_machine/instruction.cpp index 91bd1c8..58b6ffa 100644 --- a/qtmips_machine/instruction.cpp +++ b/qtmips_machine/instruction.cpp @@ -109,6 +109,10 @@ std::uint32_t Instruction::data() const { return this->dt; } -bool Instruction::operator ==(const Instruction &c) const { +bool Instruction::operator==(const Instruction &c) const { return (this->data() == c.data()); } + +bool Instruction::operator!=(const Instruction &c) const { + return ! this->operator==(c); +} -- cgit v1.2.3