<commit_before>#include <cereal/archives/binary.hpp>
#include <memory>

#include "gtest/gtest.h"
#include "relic_wrapper/relic_api.h"
using namespace std;
void rand(ZR &a, PairingGroup &g){
	a= g.randomZR();
}
void rand(G1 &a, PairingGroup &g){
	a= g.randomG1();
}
void rand(G2 &a, PairingGroup &g){
	a= g.randomG2();
}
void rand(GT &a, PairingGroup &g){
	a= g.randomGT();
}
extern 	void pc_param_print();
extern int pc_param_level();
class RelicEnvironment: public ::testing::Environment{
	std::unique_ptr<relicResourceHandle> handle;
 public:
  virtual ~RelicEnvironment() {}
  // Override this to define how to set up the environment.
  virtual void SetUp() {
	  cout << "Attempting to initalize relic" <<endl;
	  handle = std::unique_ptr<relicResourceHandle>(new relicResourceHandle);
	  if(!handle){
		  cerr << "Error. Cannot initialze relic. new relicResourceHandle failed." << endl;
		  throw runtime_error("Error. Cannot initialze relic. new relicResourceHandle failed.");
	  }
	  cout << "relic intialized:\t" << std::boolalpha << handle->isInitalized() << std::noboolalpha << endl;
	  cout << "relic curve security level:\t" << pc_param_level();
	  pc_param_print();
  }
	  // Override this to define how to tear down the environment.
  virtual void TearDown() {}
};
::testing::Environment* const foo_env = ::testing::AddGlobalTestEnvironment(new RelicEnvironment);

template <typename T>
class AlgTest : public :: testing::Test{
public:
int a;
//PairingGroup g;
};

<commit_msg>added VM entropy warning to test setup<commit_after>#include <cereal/archives/binary.hpp>
#include <memory>

#include "gtest/gtest.h"
#include "relic_wrapper/relic_api.h"
using namespace std;
void rand(ZR &a, PairingGroup &g){
	a= g.randomZR();
}
void rand(G1 &a, PairingGroup &g){
	a= g.randomG1();
}
void rand(G2 &a, PairingGroup &g){
	a= g.randomG2();
}
void rand(GT &a, PairingGroup &g){
	a= g.randomGT();
}
extern 	void pc_param_print();
extern int pc_param_level();
class RelicEnvironment: public ::testing::Environment{
	std::unique_ptr<relicResourceHandle> handle;
 public:
  virtual ~RelicEnvironment() {}
  // Override this to define how to set up the environment.
  virtual void SetUp() {
	  cout << "Attempting to initialize relict..." <<endl << endl <<
			  "\tIf this takes a very long time  you may have ran out of entropy." << endl <<
			  "\tThis sometimes happens on VMs. If you have this issue, either fix " << endl <<
			  "\tyour vm entropy (if possible) or recompile relic with -DRAND=\"UDEV\"" << endl <<
			  "\tor some other option hat that\tis not DEV (i.e. /dev/random)" << endl <<
			  "\t(WARNING many of these may not be cryptographically safe) ."  << endl << endl;
	  handle = std::unique_ptr<relicResourceHandle>(new relicResourceHandle);
	  if(!handle){
		  cerr << "Error. Cannot initialze relic. new relicResourceHandle failed." << endl;
		  throw runtime_error("Error. Cannot initialze relic. new relicResourceHandle failed.");
	  }
	  cout << "Relic intialized"<<endl;
	  cout << "relic curve security level:\t" << pc_param_level();
	  pc_param_print();
  }
	  // Override this to define how to tear down the environment.
  virtual void TearDown() {}
};
::testing::Environment* const foo_env = ::testing::AddGlobalTestEnvironment(new RelicEnvironment);

template <typename T>
class AlgTest : public :: testing::Test{
public:
int a;
//PairingGroup g;
};


{'fraction_non_alphanumeric': 0.139899438036084, 'fraction_numerical': 0.0023661638568470865, 'mean_word_length': 4.553366174055829, 'pattern_counts': {'":': 0, '<': 75, '<?xml version=': 0, '>': 14, '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': '5033320', 'n_tokens_mistral': 1159, 'n_tokens_neox': 1085, 'n_words': 344}