<commit_before>open Printf

let error_occurred = ref false

let function_tested = ref ""

let testing_function s =
    function_tested := s;
    print_newline();
    print_string s;
    print_newline()

let test test_number eq_fun (answer, correct_answer) =
 flush stdout;
 flush stderr;
 if not (eq_fun answer correct_answer) then begin
   fprintf stderr ">>> Bad result (%s, test %d)\n" !function_tested test_number;
   error_occurred := true;
   false
 end else begin
   printf " %d..." test_number;
   true
 end

let failure_test test_number fun_to_test arg =
 flush stdout;
 flush stderr;
 try
   fun_to_test arg;
   fprintf stderr ">>> Failure expected (%s, test %d)\n"
                  !function_tested test_number;
   error_occurred := true;
   false
  with _ ->
   printf " %d..." test_number;
   true

let failwith_test test_number fun_to_test arg correct_failure =
 try
   fun_to_test arg;
   fprintf stderr ">>> Failure expected (%s, test %d)\n"
                  !function_tested test_number;
   error_occurred := true;
   false
  with x ->
   if x = correct_failure then begin
     printf " %d..." test_number;
     true
   end else begin
     fprintf stderr ">>> Bad failure (%s, test %d)\n"
                    !function_tested test_number;
     error_occurred := true;
     false
   end   

let eq = (==)
let eq_int = (==)
let eq_string = (=)

let sixtyfour = (1 lsl 32) <> 0<commit_msg>Detection 32 bits / 64 bits corrigee.<commit_after>open Printf

let error_occurred = ref false

let function_tested = ref ""

let testing_function s =
    function_tested := s;
    print_newline();
    print_string s;
    print_newline()

let test test_number eq_fun (answer, correct_answer) =
 flush stdout;
 flush stderr;
 if not (eq_fun answer correct_answer) then begin
   fprintf stderr ">>> Bad result (%s, test %d)\n" !function_tested test_number;
   error_occurred := true;
   false
 end else begin
   printf " %d..." test_number;
   true
 end

let failure_test test_number fun_to_test arg =
 flush stdout;
 flush stderr;
 try
   fun_to_test arg;
   fprintf stderr ">>> Failure expected (%s, test %d)\n"
                  !function_tested test_number;
   error_occurred := true;
   false
  with _ ->
   printf " %d..." test_number;
   true

let failwith_test test_number fun_to_test arg correct_failure =
 try
   fun_to_test arg;
   fprintf stderr ">>> Failure expected (%s, test %d)\n"
                  !function_tested test_number;
   error_occurred := true;
   false
  with x ->
   if x = correct_failure then begin
     printf " %d..." test_number;
     true
   end else begin
     fprintf stderr ">>> Bad failure (%s, test %d)\n"
                    !function_tested test_number;
     error_occurred := true;
     false
   end   

let eq = (==)
let eq_int = (==)
let eq_string = (=)

let sixtyfour = (1 lsl 31) <> 0
{'fraction_non_alphanumeric': 0.0995059985885674, 'fraction_numerical': 0.004234297812279464, 'mean_word_length': 2.8466757123473543, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 33, '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': '2236405', 'n_tokens_mistral': 958, 'n_tokens_neox': 919, 'n_words': 292}