     }
 
     if let x = benchArgs.optionalArgsMap["--delim"] {
-      if x.isEmpty { return .Fail("--delim requires a value") }
+      if x.isEmpty { return .fail("--delim requires a value") }
       delim = x
     }
 
     if let x = benchArgs.optionalArgsMap["--tags"] {
-      if x.isEmpty { return .Fail("--tags requires a value") }
+      if x.isEmpty { return .fail("--tags requires a value") }
       if x.contains("cpubench") {
-        tags.insert(BenchmarkCategories.cpubench)
+        tags.insert(.cpubench)
       }
       if x.contains("unstable") {
-        tags.insert(BenchmarkCategories.unstable)
+        tags.insert(.unstable)
       }
       if x.contains("validation") {
-        tags.insert(BenchmarkCategories.validation)
+        tags.insert(.validation)
       }
       if x.contains("api") {
-        tags.insert(BenchmarkCategories.api)
+        tags.insert(.api)
       }
       if x.contains("Array") {
-        tags.insert(BenchmarkCategories.Array)
+        tags.insert(.Array)
       }
       if x.contains("String") {
-        tags.insert(BenchmarkCategories.String)
+        tags.insert(.String)
       }
       if x.contains("Dictionary") {
-        tags.insert(BenchmarkCategories.Dictionary)
+        tags.insert(.Dictionary)
       }
       if x.contains("Codable") {
-        tags.insert(BenchmarkCategories.Codable)
+        tags.insert(.Codable)
       }
       if x.contains("Set") {
-        tags.insert(BenchmarkCategories.Set)
+        tags.insert(.Set)
       }
       if x.contains("sdk") {
-        tags.insert(BenchmarkCategories.sdk)
+        tags.insert(.sdk)
       }
       if x.contains("runtime") {
-        tags.insert(BenchmarkCategories.runtime)
+        tags.insert(.runtime)
       }
       if x.contains("refcount") {
-        tags.insert(BenchmarkCategories.refcount)
+        tags.insert(.refcount)
       }
       if x.contains("metadata") {
-        tags.insert(BenchmarkCategories.metadata)
+        tags.insert(.metadata)
       }
       if x.contains("abstraction") {
-        tags.insert(BenchmarkCategories.abstraction)
+        tags.insert(.abstraction)
       }
       if x.contains("safetychecks") {
-        tags.insert(BenchmarkCategories.safetychecks)
+        tags.insert(.safetychecks)
       }
       if x.contains("exceptions") {
-        tags.insert(BenchmarkCategories.exceptions)
+        tags.insert(.exceptions)
       }
       if x.contains("bridging") {
-        tags.insert(BenchmarkCategories.bridging)
+        tags.insert(.bridging)
       }
       if x.contains("concurrency") {
-        tags.insert(BenchmarkCategories.concurrency)
+        tags.insert(.concurrency)
       }
       if x.contains("algorithm") {
-        tags.insert(BenchmarkCategories.algorithm)
+        tags.insert(.algorithm)
       }
       if x.contains("miniapplication") {
-        tags.insert(BenchmarkCategories.miniapplication)
+        tags.insert(.miniapplication)
       }
       if x.contains("regression") {
-        tags.insert(BenchmarkCategories.regression)
+        tags.insert(.regression)
       }
     }
 

public var registeredBenchmarks = [TestsUtils.BenchmarkInfo]()

enum TestAction {
  case Run
  case ListTests
  case Fail(String)
}

struct TestConfig {


    if let x = benchArgs.optionalArgsMap["--sleep"] {
      if x.isEmpty {
        return .fail("--sleep requires a non-empty integer value")
      }
      let v: Int? = Int(x)
      if v == nil {
        return .fail("--sleep requires a non-empty integer value")
      }
      afterRunSleep = v!
    }

    if let _ = benchArgs.optionalArgsMap["--list"] {
      return .listTests
    }

    if let _ = benchArgs.optionalArgsMap["--registered"] {
      onlyRegistered = true
    }

    return .run
  }

  mutating func findTestsToRun() {
