<commit_before>#pragma once

#include <vector>
#include <gtest/gtest.h>

#include "../../../../include/cpp/LinkedList.hxx"
#include "../../../../include/cpp/ListNode.hxx"
#include "addtwonumbers.hxx"

using std::vector;

namespace {
  class AddTwoNumbersTest : public testing::Test
  {
  protected:
    AddTwoNumbersTest(void) {}
    virtual ~AddTwoNumbersTest(void) {}
    virtual void SetUp(void) {}
    virtual void TearDown(void) {}
  };

  TEST(AddTwoNumbersTest, TwoSum1)
  {
    ListNode* input1 = new ListNode(2);
    input1->next = new ListNode(4);
    input1->next = new ListNode(3);

    ListNode* input2 = new ListNode(5);
    input2->next = new ListNode(6);
    input2->next = new ListNode(4);

    ListNode* actual = Solution{}.addTwoNumbers(input1, input2);

    ListNode* expected = new ListNode(7);
    expected->next = new ListNode(0);
    expected->next = new ListNode(8);

    EXPECT_TRUE(linkedMatch<ListNode>(expected, actual));
  }
}
<commit_msg>clobbering element in linked list - fixed<commit_after>#pragma once

#include <vector>
#include <gtest/gtest.h>

#include "../../../../include/cpp/LinkedList.hxx"
#include "../../../../include/cpp/ListNode.hxx"
#include "addtwonumbers.hxx"

using std::vector;

namespace {
  class AddTwoNumbersTest : public testing::Test
  {
  protected:
    AddTwoNumbersTest(void) {}
    virtual ~AddTwoNumbersTest(void) {}
    virtual void SetUp(void) {}
    virtual void TearDown(void) {}
  };

  TEST(AddTwoNumbersTest, TwoSum1)
  {
    ListNode* input1 = new ListNode(2);
    input1->next = new ListNode(4);
    input1->next->next = new ListNode(3);

    ListNode* input2 = new ListNode(5);
    input2->next = new ListNode(6);
    input2->next->next = new ListNode(4);

    ListNode* actual = Solution{}.addTwoNumbers(input1, input2);

    ListNode* expected = new ListNode(7);
    expected->next = new ListNode(0);
    expected->next = new ListNode(8);

    EXPECT_TRUE(linkedMatch<ListNode>(expected, actual));
  }
}

{'fraction_non_alphanumeric': 0.15824064711830133, 'fraction_numerical': 0.01820020222446916, 'mean_word_length': 3.5810185185185186, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 23, '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': '657652', 'n_tokens_mistral': 684, 'n_tokens_neox': 669, 'n_words': 139}