<commit_before>#include "gtest/gtest.h"
#include "haxor/hvm/regs.hh"

TEST(regs_test, ignore_writes_to_zero)
{
  haxor::regs regs;
  regs.write(0, 123); // write 123 to register 0
  ASSERT_EQ(regs.read(0), 0); // still zero
}

TEST(regs_test, read_write)
{
  haxor::regs regs;
  regs.write(5, 123);
  ASSERT_EQ(123, regs.read(5));
}<commit_msg>expected value should be first<commit_after>#include "gtest/gtest.h"
#include "haxor/hvm/regs.hh"

TEST(regs_test, ignore_writes_to_zero)
{
  haxor::regs regs;
  regs.write(0, 123); // write 123 to register 0
  ASSERT_EQ(0, regs.read(0)); // still zero
}

TEST(regs_test, read_write)
{
  haxor::regs regs;
  regs.write(5, 123);
  ASSERT_EQ(123, regs.read(5));
}
{'fraction_non_alphanumeric': 0.16453900709219857, 'fraction_numerical': 0.05106382978723404, 'mean_word_length': 4.739837398373984, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2702828', 'n_tokens_mistral': 333, 'n_tokens_neox': 302, 'n_words': 58}