list_gms.cpp 593 B

12345678910111213141516171819202122232425
  1. /*
  2. * Copyright 2018 Google Inc.
  3. *
  4. * Use of this source code is governed by a BSD-style license that can be
  5. * found in the LICENSE file.
  6. */
  7. #include <algorithm>
  8. #include <iostream>
  9. #include <string>
  10. #include <vector>
  11. #include "gm/gm.h"
  12. int main() {
  13. std::vector<std::string> gms;
  14. for (skiagm::GMFactory factory : skiagm::GMRegistry::Range()) {
  15. std::unique_ptr<skiagm::GM> gm(factory(nullptr));
  16. gms.push_back(std::string(gm->getName()));
  17. }
  18. std::sort(gms.begin(), gms.end());
  19. for (const std::string& gm : gms) {
  20. std::cout << gm << '\n';
  21. }
  22. }