Adds color support for TERM=linux (by Alexander Demin); renames List to Vector (by Zhanyong Wan); implements Vector::Erase (by Vlad Losev).

This commit is contained in:
zhanyong.wan
2009-07-13 19:25:02 +00:00
parent 600105ee3a
commit 89080477ae
10 changed files with 208 additions and 132 deletions
+5 -5
View File
@@ -66,17 +66,17 @@ std::ostream& operator<<(std::ostream& os, const TestPartResult& result) {
// Constructs an empty TestPartResultArray.
TestPartResultArray::TestPartResultArray()
: list_(new internal::List<TestPartResult>) {
: array_(new internal::Vector<TestPartResult>) {
}
// Destructs a TestPartResultArray.
TestPartResultArray::~TestPartResultArray() {
delete list_;
delete array_;
}
// Appends a TestPartResult to the array.
void TestPartResultArray::Append(const TestPartResult& result) {
list_->PushBack(result);
array_->PushBack(result);
}
// Returns the TestPartResult at the given index (0-based).
@@ -86,12 +86,12 @@ const TestPartResult& TestPartResultArray::GetTestPartResult(int index) const {
internal::posix::Abort();
}
return list_->GetElement(index);
return array_->GetElement(index);
}
// Returns the number of TestPartResult objects in the array.
int TestPartResultArray::size() const {
return list_->size();
return array_->size();
}
namespace internal {