<commit_before>#include "stdafx.h"
#include "MultiInheritTest.h"
#include "Autowired.h"
#include "CoreContext.h"
#include "TestFixtures/MultiInherit.h"

class Shared {
};

class Base {
public:
  AutoRequired<Shared> m_member;
};

class Derived:
  public Base
{
public:
  Derived(void) {
    EXPECT_TRUE(Base::m_member.IsAutowired()) << "Base AutoRequired member was not initialized properly";
    EXPECT_EQ(m_member, m_secondMember) << "Autowiring idempotency was violated";
  }

  Autowired<Shared> m_secondMember;
};

TEST_F(MultiInheritTest, VerifyCast) {
  // Create a dummy context and make it current:
  Autowired<CoreContext> ctxt;<commit_msg>Made a Shared class nontrivial for better test validation<commit_after>#include "stdafx.h"
#include "MultiInheritTest.h"
#include "Autowired.h"
#include "CoreContext.h"
#include "TestFixtures/MultiInherit.h"

class Shared {
public:
  Shared(void) {
    m_i = 100;
  }

  int m_i;
};

class Base {
public:
  AutoRequired<Shared> m_member;
};

class Derived:
  public Base
{
public:
  Derived(void) {
    EXPECT_TRUE(Base::m_member.IsAutowired()) << "Base AutoRequired member was not initialized properly";
    EXPECT_TRUE(100, Base::m_member->m_i) << "Autowired instance was not properly constructed";
    EXPECT_EQ(m_member, m_secondMember) << "Autowiring idempotency was violated";
  }

  Autowired<Shared> m_secondMember;
};

TEST_F(MultiInheritTest, VerifyCast) {
  // Create a dummy context and make it current:
  Autowired<CoreContext> ctxt;
{'fraction_non_alphanumeric': 0.11497326203208556, 'fraction_numerical': 0.004010695187165776, 'mean_word_length': 5.2635983263598325, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 10, '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': '5175400', 'n_tokens_mistral': 525, 'n_tokens_neox': 523, 'n_words': 123}