diff --git a/unit/testing-utils/load_java_class.cpp b/unit/testing-utils/load_java_class.cpp index c8da44814cc..f198008dff4 100644 --- a/unit/testing-utils/load_java_class.cpp +++ b/unit/testing-utils/load_java_class.cpp @@ -17,6 +17,7 @@ #include #include +#include /// Go through the process of loading, type-checking and finalising loading a /// specific class file to build the symbol table. The functions are converted @@ -128,6 +129,12 @@ symbol_tablet load_java_class( const typet &class_type=class_symbol.type; REQUIRE(class_type.id()==ID_struct); + // Log the working directory to help people identify the common error + // of wrong working directory (should be the `unit` directory when running + // the unit tests). + std::string path = get_current_working_directory(); + INFO("Working directory: " << path); + // if this fails it indicates the class was not loaded // Check your working directory and the class path is correctly configured // as this often indicates that one of these is wrong.