<commit_before>
/*
 * apk_test.cpp - This file tests basic APK operation
 */ 

#include "apk.h"
#include "test_suite.h"

using namespace wangziqi2013;
using namespace android_dalvik_analysis;

/*
 * TestReadFileHeader() - Tests whether file header could be read
 */
void TestReadFileHeader() {
  _PrintTestName();
  
  ApkArchive("./test.apk");
  
  try {
    ApkArchive("./corrupt.apk");
  } catch(int) {
    fprintf(stderr, "Successfully caught the exception\n"); 
    
    return;
  } 
  
  assert(false);
  
  return;<commit_msg>Link file name printing test<commit_after>
/*
 * apk_test.cpp - This file tests basic APK operation
 */ 

#include "apk.h"
#include "test_suite.h"

using namespace wangziqi2013;
using namespace android_dalvik_analysis;

/*
 * TestReadFileHeader() - Tests whether file header could be read
 */
void TestReadFileHeader() {
  _PrintTestName();
  
  ApkArchive apk{"./test.apk"};
  apk.DebugPrintAllFileName();
  
  try {
    ApkArchive("./corrupt.apk");
  } catch(int) {
    fprintf(stderr, "Successfully caught the exception\n"); 
    
    return;
  } 
  
  assert(false);
  
  return;
{'fraction_non_alphanumeric': 0.12544802867383512, 'fraction_numerical': 0.007168458781362007, 'mean_word_length': 3.3976377952755907, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6914345', 'n_tokens_mistral': 401, 'n_tokens_neox': 375, 'n_words': 87}