skia2/tools/list_gpu_unit_tests.cpp
Hal Canary 972eba3c5c sk_tool::Registry: make an iterator.
Change-Id: Icf4e31b50bbd91b7ea330a1300f736d6dfd0a41c
Reviewed-on: https://skia-review.googlesource.com/144500
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Auto-Submit: Hal Canary <halcanary@google.com>
2018-08-01 16:59:19 +00:00

27 lines
592 B
C++

/*
* Copyright 2018 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <algorithm>
#include <iostream>
#include <string>
#include <vector>
#include "Test.h"
int main() {
std::vector<std::string> tests;
for (const skiatest::Test& test : skiatest::TestRegistry::Range()) {
if (test.needsGpu) {
tests.push_back(std::string(test.name));
}
}
std::sort(tests.begin(), tests.end());
for (const std::string& test : tests) {
std::cout << test << '\n';
}
}