| OLD | NEW |
| 1 // Copyright (c) 2014, the Dartino project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dartino project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE.md file. | 3 // BSD-style license that can be found in the LICENSE.md file. |
| 4 | 4 |
| 5 #include "src/shared/test_case.h" | 5 #include "src/shared/test_case.h" |
| 6 | 6 |
| 7 #include <stdio.h> | 7 #include <stdio.h> |
| 8 #include <string.h> | 8 #include <string.h> |
| 9 | 9 |
| 10 #include "src/shared/flags.h" | 10 #include "src/shared/flags.h" |
| 11 #include "src/shared/fletch.h" | 11 #include "src/shared/dartino.h" |
| 12 | 12 |
| 13 namespace fletch { | 13 namespace dartino { |
| 14 | 14 |
| 15 TestCase* TestCase::first_ = NULL; | 15 TestCase* TestCase::first_ = NULL; |
| 16 TestCase* TestCase::current_ = NULL; | 16 TestCase* TestCase::current_ = NULL; |
| 17 | 17 |
| 18 TestCase::TestCase(RunEntry* run, const char* name) | 18 TestCase::TestCase(RunEntry* run, const char* name) |
| 19 : next_(NULL), run_(run), name_(name) { | 19 : next_(NULL), run_(run), name_(name) { |
| 20 if (first_ == NULL) { | 20 if (first_ == NULL) { |
| 21 first_ = this; | 21 first_ = this; |
| 22 } else { | 22 } else { |
| 23 current_->next_ = this; | 23 current_->next_ = this; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 34 const char* filter = Flags::filter; | 34 const char* filter = Flags::filter; |
| 35 if (filter != NULL) { | 35 if (filter != NULL) { |
| 36 run = (strcmp(filter, test_case->name()) == 0); | 36 run = (strcmp(filter, test_case->name()) == 0); |
| 37 if (run) printf("Running %s\n", test_case->name()); | 37 if (run) printf("Running %s\n", test_case->name()); |
| 38 } | 38 } |
| 39 if (run) test_case->Run(); | 39 if (run) test_case->Run(); |
| 40 test_case = test_case->next_; | 40 test_case = test_case->next_; |
| 41 } | 41 } |
| 42 } | 42 } |
| 43 | 43 |
| 44 } // namespace fletch | 44 } // namespace dartino |
| OLD | NEW |