diff options
Diffstat (limited to 'xdelta3/testing/regtest.cc')
-rw-r--r-- | xdelta3/testing/regtest.cc | 33 |
1 files changed, 19 insertions, 14 deletions
diff --git a/xdelta3/testing/regtest.cc b/xdelta3/testing/regtest.cc index 05a27ff..c39d56c 100644 --- a/xdelta3/testing/regtest.cc +++ b/xdelta3/testing/regtest.cc | |||
@@ -690,12 +690,14 @@ void FourWayMergeTest(const TestOptions &options, | |||
690 | tcmd.push_back(recon.Name()); | 690 | tcmd.push_back(recon.Name()); |
691 | tcmd.push_back(NULL); | 691 | tcmd.push_back(NULL); |
692 | 692 | ||
693 | DP(RINT "Running one recon! %s\n", CommandToString(tcmd).c_str()); | ||
693 | CHECK_EQ(0, xd3_main_cmdline(tcmd.size() - 1, | 694 | CHECK_EQ(0, xd3_main_cmdline(tcmd.size() - 1, |
694 | const_cast<char**>(&tcmd[0]))); | 695 | const_cast<char**>(&tcmd[0]))); |
695 | DP(RINT "Ran one recon! %s\n", CommandToString(tcmd).c_str()); | ||
696 | DP(RINT "Should equal! %s\n", f2.Name()); | 696 | DP(RINT "Should equal! %s\n", f2.Name()); |
697 | 697 | ||
698 | CHECK(recon.EqualsSpec(spec2)); | 698 | CHECK(recon.EqualsSpec(spec2)); |
699 | |||
700 | /* TODO: we've only done 3-way merges, try 4-way. */ | ||
699 | } | 701 | } |
700 | 702 | ||
701 | void TestMergeCommand1() { | 703 | void TestMergeCommand1() { |
@@ -758,6 +760,8 @@ void TestMergeCommand1() { | |||
758 | 760 | ||
759 | void TestMergeCommand2() { | 761 | void TestMergeCommand2() { |
760 | /* Same as above, different mutation pattern. */ | 762 | /* Same as above, different mutation pattern. */ |
763 | /* TODO: run this with large sizes too */ | ||
764 | /* TODO: run this with small sizes too */ | ||
761 | MTRandom rand; | 765 | MTRandom rand; |
762 | FileSpec spec0(&rand); | 766 | FileSpec spec0(&rand); |
763 | FileSpec spec1(&rand); | 767 | FileSpec spec1(&rand); |
@@ -806,6 +810,7 @@ void TestMergeCommand2() { | |||
806 | spec0.ModifyTo(ChangeListMutator(cl3), &spec3); | 810 | spec0.ModifyTo(ChangeListMutator(cl3), &spec3); |
807 | 811 | ||
808 | FourWayMergeTest(options, spec0, spec1, spec2, spec3); | 812 | FourWayMergeTest(options, spec0, spec1, spec2, spec3); |
813 | FourWayMergeTest(options, spec3, spec2, spec1, spec0); | ||
809 | } | 814 | } |
810 | } | 815 | } |
811 | } | 816 | } |
@@ -816,19 +821,19 @@ void TestMergeCommand2() { | |||
816 | 821 | ||
817 | int main(int argc, char **argv) { | 822 | int main(int argc, char **argv) { |
818 | #define TEST(x) cerr << #x << "..." << endl; x() | 823 | #define TEST(x) cerr << #x << "..." << endl; x() |
819 | // TEST(TestRandomNumbers); | 824 | TEST(TestRandomNumbers); |
820 | // TEST(TestRandomFile); | 825 | TEST(TestRandomFile); |
821 | // TEST(TestFirstByte); | 826 | TEST(TestFirstByte); |
822 | // TEST(TestEmptyInMemory); | 827 | TEST(TestEmptyInMemory); |
823 | // TEST(TestBlockInMemory); | 828 | TEST(TestBlockInMemory); |
824 | // TEST(TestModifyMutator); | 829 | TEST(TestModifyMutator); |
825 | // TEST(TestAddMutator); | 830 | TEST(TestAddMutator); |
826 | // TEST(TestDeleteMutator); | 831 | TEST(TestDeleteMutator); |
827 | // TEST(TestCopyMutator); | 832 | TEST(TestCopyMutator); |
828 | // TEST(TestMoveMutator); | 833 | TEST(TestMoveMutator); |
829 | // TEST(TestOverwriteMutator); | 834 | TEST(TestOverwriteMutator); |
830 | // TEST(TestNonBlockingProgress); | 835 | TEST(TestNonBlockingProgress); |
831 | // TEST(TestMergeCommand1); | 836 | TEST(TestMergeCommand1); |
832 | TEST(TestMergeCommand2); | 837 | TEST(TestMergeCommand2); |
833 | return 0; | 838 | return 0; |
834 | } | 839 | } |