| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "courgette/base_test_unittest.h" | 5 #include "courgette/base_test_unittest.h" |
| 6 #include "courgette/courgette.h" | 6 #include "courgette/courgette.h" |
| 7 #include "courgette/streams.h" | 7 #include "courgette/streams.h" |
| 8 | 8 |
| 9 #if defined(OS_WIN) && !defined(NDEBUG) |
| 10 // Ensemble tests still take too long on Debug Windows so disabling for now |
| 11 // TODO(dgarrett) http://code.google.com/p/chromium/issues/detail?id=101614 |
| 12 #define MAYBE_PE DISABLED_PE |
| 13 #define MAYBE_PE64 DISABLED_PE64 |
| 14 #define MAYBE_Elf32 DISABLED_Elf32 |
| 15 #else |
| 16 #define MAYBE_PE PE |
| 17 #define MAYBE_PE64 PE64 |
| 18 #define MAYBE_Elf32 Elf32 |
| 19 #endif |
| 20 |
| 9 class EnsembleTest : public BaseTest { | 21 class EnsembleTest : public BaseTest { |
| 10 public: | 22 public: |
| 11 | 23 |
| 12 void TestEnsemble(std::string src_bytes, std::string tgt_bytes) const; | 24 void TestEnsemble(std::string src_bytes, std::string tgt_bytes) const; |
| 13 | 25 |
| 14 void PeEnsemble() const; | 26 void PeEnsemble() const; |
| 15 void Pe64Ensemble() const; | 27 void Pe64Ensemble() const; |
| 16 void Elf32Ensemble() const; | 28 void Elf32Ensemble() const; |
| 17 }; | 29 }; |
| 18 | 30 |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 | 108 |
| 97 std::string src_bytes = FilesContents(src_ensemble); | 109 std::string src_bytes = FilesContents(src_ensemble); |
| 98 std::string tgt_bytes = FilesContents(tgt_ensemble); | 110 std::string tgt_bytes = FilesContents(tgt_ensemble); |
| 99 | 111 |
| 100 src_bytes = "aaabbbccc" + src_bytes + "dddeeefff"; | 112 src_bytes = "aaabbbccc" + src_bytes + "dddeeefff"; |
| 101 tgt_bytes = "aaagggccc" + tgt_bytes + "dddeeefff"; | 113 tgt_bytes = "aaagggccc" + tgt_bytes + "dddeeefff"; |
| 102 | 114 |
| 103 TestEnsemble(src_bytes, tgt_bytes); | 115 TestEnsemble(src_bytes, tgt_bytes); |
| 104 } | 116 } |
| 105 | 117 |
| 106 // Ensemble tests still take too long on Windows so disabling for now | 118 TEST_F(EnsembleTest, MAYBE_PE) { |
| 107 // TODO(dgarrett) http://code.google.com/p/chromium/issues/detail?id=101614 | |
| 108 | |
| 109 TEST_F(EnsembleTest, DISABLED_PE) { | |
| 110 PeEnsemble(); | 119 PeEnsemble(); |
| 111 } | 120 } |
| 112 | 121 |
| 113 TEST_F(EnsembleTest, DISABLED_PE64) { | 122 TEST_F(EnsembleTest, MAYBE_PE64) { |
| 114 Pe64Ensemble(); | 123 Pe64Ensemble(); |
| 115 } | 124 } |
| 116 | 125 |
| 117 TEST_F(EnsembleTest, DISABLED_Elf32) { | 126 TEST_F(EnsembleTest, MAYBE_Elf32) { |
| 118 Elf32Ensemble(); | 127 Elf32Ensemble(); |
| 119 } | 128 } |
| OLD | NEW |