<commit_before>#include "gtest/gtest.h"

#include <stdint.h>
#include "cnetwork_asio.h"

CNetwork_Asio network;

TEST( NetworkingASIO, TestInit )
{
	EXPECT_EQ(true, network.Init( "127.0.0.1", 29000 ));
}

TEST( NetworkingASIO, TestInitHostLessThanSeven )
{
	EXPECT_EQ( false, network.Init( "0", 29000 ) );
}

TEST( NetworkingASIO, TestConnect )
{
	EXPECT_EQ( true, network.Init( "192.168.127.12", 80 ) ); // We are going to connect to google's website
	EXPECT_NO_FATAL_FAILURE( network.Connect( ) );

	EXPECT_NO_FATAL_FAILURE( network.Disconnect( ) );
	EXPECT_NO_FATAL_FAILURE( network.Shutdown( ) );
}<commit_msg>Updated network test. May need some waits in there to make sure connections were actually made.<commit_after>#include "gtest/gtest.h"

#include <stdint.h>
#include "cnetwork_asio.h"

CNetwork_Asio network;

TEST( NetworkingASIO, TestInit )
{
	EXPECT_EQ(true, network.Init( "127.0.0.1", 29000 ));
}

TEST( NetworkingASIO, TestInitHostLessThanSeven )
{
	EXPECT_EQ( false, network.Init( "0", 29000 ) );
}

TEST( NetworkingASIO, TestConnect )
{
	EXPECT_EQ( true, network.Init( "192.168.127.12", 80 ) ); // We are going to connect to google's website
	EXPECT_NO_FATAL_FAILURE( network.Connect( ) );

	EXPECT_NO_FATAL_FAILURE( network.Disconnect( ) );
	EXPECT_NO_FATAL_FAILURE( network.Shutdown( ) );
}

TEST( NetworkingASIO, TestListen )
{
	EXPECT_EQ( true, network.Init( "0.0.0.0", 29000 ) ); // We are going to connect to google's website
	EXPECT_NO_FATAL_FAILURE( network.Listen() );
	EXPECT_NO_FATAL_FAILURE( network.Shutdown() );
}

//TEST( NetworkingASIO, TestListenAndConnect )
//{
//	CNetwork_Asio netConnect;
//	EXPECT_EQ( true, network.Init( "0.0.0.0", 29000 ) ); // We are going to connect to google's website
//	EXPECT_NO_FATAL_FAILURE( network.Listen() );
//
//	EXPECT_EQ( true, netConnect.Init( "127.0.0.1", 29000 ) );
//	EXPECT_NO_FATAL_FAILURE( netConnect.Connect( ) );
//	EXPECT_NO_FATAL_FAILURE( netConnect.Disconnect( ) );
//	EXPECT_NO_FATAL_FAILURE( netConnect.Shutdown( ) );
//
//	EXPECT_NO_FATAL_FAILURE( network.Shutdown() );
//}

{'fraction_non_alphanumeric': 0.14742967992240544, 'fraction_numerical': 0.0431619786614937, 'mean_word_length': 4.894285714285714, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 7, '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': '7566138', 'n_tokens_mistral': 835, 'n_tokens_neox': 805, 'n_words': 158}