#ifndef TESTING_HPP
#define TESTING_HPP

#include "defines.hpp"
#include <cstdint>
#include <iostream>
#include <stdexcept>
#include <string>
#include <tuple>
#include <vector>

struct GameboyTestState {
  Word PC;
  Word SP;
  Byte A;
  Byte F;
  Byte B;
  Byte C;
  Byte D;
  Byte E;
  Byte H;
  Byte L;
  // Byte IME;
  // Byte IE;
  std::vector<std::tuple<Word, Byte>> RAM;
};

inline bool operator==(const GameboyTestState &lhs,
                       const GameboyTestState &rhs) {
  for (int i = 0; i < lhs.RAM.size(); i++) {
    if (std::get<1>(lhs.RAM[i]) != std::get<1>(rhs.RAM[i]))
      return false;
  }
  return (lhs.A == rhs.A && lhs.F == rhs.F && lhs.B == rhs.B &&
          lhs.C == rhs.C && lhs.D == rhs.D && lhs.E == rhs.E &&
          lhs.H == rhs.H && lhs.L == rhs.L);
}

#endif // TESTING_HPP
