-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7837772
commit 0e88074
Showing
4 changed files
with
81 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#ifndef APPROVALTESTS_CPP_DIFFINFO_H | ||
#define APPROVALTESTS_CPP_DIFFINFO_H | ||
|
||
#include <string> | ||
|
||
enum class Type {TEXT, IMAGE, TEXT_AND_IMAGE}; | ||
|
||
struct DiffInfo | ||
{ | ||
DiffInfo(std::string program, Type type) : | ||
program(program), | ||
arguments("%s %s"), | ||
type(type) | ||
{ | ||
} | ||
DiffInfo(std::string program, std::string arguments, Type type) : | ||
program(program), | ||
arguments(arguments), | ||
type(type) | ||
{ | ||
} | ||
std::string program; | ||
std::string arguments; | ||
Type type; | ||
}; | ||
|
||
|
||
#endif //APPROVALTESTS_CPP_DIFFINFO_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
#ifndef APPROVALTESTS_CPP_DIFFPROGRAMS_H | ||
#define APPROVALTESTS_CPP_DIFFPROGRAMS_H | ||
|
||
#include "DiffInfo.h" | ||
|
||
/////////////////////////////////////////////////////////////////////////////// | ||
#define ENTRY(name, defaultValue) \ | ||
static DiffInfo name() { return defaultValue; } | ||
/////////////////////////////////////////////////////////////////////////////// | ||
|
||
namespace DiffPrograms { | ||
|
||
|
||
namespace Mac { | ||
ENTRY(DIFF_MERGE, | ||
DiffInfo("/Applications/DiffMerge.app/Contents/MacOS/DiffMerge", "%s %s -nosplash", Type::TEXT)) | ||
|
||
ENTRY(BEYOND_COMPARE, DiffInfo("/Applications/Beyond Compare.app/Contents/MacOS/bcomp", Type::TEXT)) | ||
|
||
ENTRY(KALEIDOSCOPE, DiffInfo("/Applications/Kaleidoscope.app/Contents/MacOS/ksdiff", Type::TEXT_AND_IMAGE)) | ||
|
||
ENTRY(KDIFF3, DiffInfo("/Applications/kdiff3.app/Contents/MacOS/kdiff3", "%s %s -m", Type::TEXT)) | ||
|
||
ENTRY(P4MERGE, DiffInfo("/Applications/p4merge.app/Contents/MacOS/p4merge", Type::TEXT_AND_IMAGE)) | ||
|
||
ENTRY(TK_DIFF, DiffInfo("/Applications/TkDiff.app/Contents/MacOS/tkdiff", Type::TEXT)) | ||
} | ||
namespace Linux { | ||
ENTRY(MELD, DiffInfo("meld", Type::TEXT)) | ||
} | ||
namespace Windows { | ||
ENTRY(BEYOND_COMPARE_3, DiffInfo("{ProgramFiles}Beyond Compare 3\\BCompare.exe", Type::TEXT_AND_IMAGE)) | ||
|
||
ENTRY(BEYOND_COMPARE_4, DiffInfo("{ProgramFiles}Beyond Compare 4\\BCompare.exe", Type::TEXT_AND_IMAGE)) | ||
|
||
ENTRY(TORTOISE_IMAGE_DIFF, | ||
DiffInfo("{ProgramFiles}TortoiseSVN\\bin\\TortoiseIDiff.exe", "/left:%s /right:%s", Type::IMAGE)) | ||
|
||
ENTRY(TORTOISE_TEXT_DIFF, DiffInfo("{ProgramFiles}TortoiseSVN\\bin\\TortoiseMerge.exe", Type::TEXT)) | ||
|
||
ENTRY(WIN_MERGE_REPORTER, DiffInfo("{ProgramFiles}WinMerge\\WinMergeU.exe", Type::TEXT)) | ||
|
||
ENTRY(ARAXIS_MERGE, DiffInfo("{ProgramFiles}Araxis\\Araxis Merge\\Compare.exe", Type::TEXT)) | ||
|
||
ENTRY(CODE_COMPARE, DiffInfo("{ProgramFiles}Devart\\Code Compare\\CodeCompare.exe", Type::TEXT)) | ||
|
||
ENTRY(KDIFF3, DiffInfo("{ProgramFiles}KDiff3\\kdiff3.exe", Type::TEXT)) | ||
} | ||
} | ||
|
||
#endif //APPROVALTESTS_CPP_DIFFPROGRAMS_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,4 +18,4 @@ | |
18. sample project | ||
19. google test | ||
20. windows path separators | ||
21. verify takes reporters with defaults | ||
|