mirror of
https://github.com/audacity/linuxdeploy.git
synced 2026-04-13 06:51:05 -05:00
TODO: extract ELF stuff into new small C++ wrapper library that can be used in various places (e.g., AppImageLauncher, the AppImage runtime, ...)
31 lines
917 B
C++
31 lines
917 B
C++
#include "gtest/gtest.h"
|
|
|
|
#include "linuxdeploy/core/elf_file.h"
|
|
|
|
using namespace std;
|
|
using namespace linuxdeploy::core;
|
|
namespace bf = boost::filesystem;
|
|
|
|
using namespace std;
|
|
using namespace linuxdeploy::core::elf_file;
|
|
|
|
namespace LinuxDeployTest {
|
|
class ElfFileTest : public ::testing::Test {};
|
|
|
|
TEST_F(ElfFileTest, checkIsDebugSymbolsFile) {
|
|
ElfFile debugSymbolsFile(SIMPLE_LIBRARY_DEBUG_PATH);
|
|
EXPECT_TRUE(debugSymbolsFile.isDebugSymbolsFile());
|
|
|
|
ElfFile regularLibraryFile(SIMPLE_LIBRARY_PATH);
|
|
EXPECT_FALSE(regularLibraryFile.isDebugSymbolsFile());
|
|
}
|
|
|
|
TEST_F(ElfFileTest, checkIsDynamicallyLinked) {
|
|
ElfFile regularLibraryFile(SIMPLE_EXECUTABLE_PATH);
|
|
EXPECT_TRUE(regularLibraryFile.isDynamicallyLinked());
|
|
|
|
ElfFile staticLibraryFile(SIMPLE_EXECUTABLE_STATIC_PATH);
|
|
EXPECT_FALSE(staticLibraryFile.isDynamicallyLinked());
|
|
}
|
|
}
|