Improve test workflow

Use ASSERT first to make sure teh function that performs the work has
run as intended, then use EXPECT to make sure all checks are run.
This commit is contained in:
TheAssassin
2018-11-09 13:41:32 +01:00
parent a4e48db545
commit 0d59a27905

View File

@@ -3,6 +3,7 @@
#include "core.h"
using namespace std;
using namespace linuxdeploy::core;
namespace bf = boost::filesystem;
namespace LinuxDeployTest {
@@ -83,11 +84,11 @@ namespace LinuxDeployTest {
add_apprun();
linuxdeploy::core::appdir::AppDir appDir(tmpAppDir);
linuxdeploy::deployAppDirRootFiles({}, "", appDir);
ASSERT_TRUE(linuxdeploy::deployAppDirRootFiles({}, "", appDir));
ASSERT_TRUE(exists(tmpAppDir / source_desktop_path.filename()));
ASSERT_TRUE(exists(tmpAppDir / source_icon_path.filename()));
ASSERT_TRUE(exists(target_apprun_path));
EXPECT_TRUE(exists(tmpAppDir / source_desktop_path.filename()));
EXPECT_TRUE(exists(tmpAppDir / source_icon_path.filename()));
EXPECT_TRUE(exists(target_apprun_path));
}
TEST_F(LinuxDeployTestsFixture, deployAppDirRootFilesWithCustomAppRun) {