<commit_before>//===--- StringTests.swift ------------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//
import TestsUtils

public let StringTests = [
  BenchmarkInfo(name: "StringEqualPointerComparison", runFunction: run_StringEqualPointerComparison, tags: [.validation, .api, .String]),
  BenchmarkInfo(name: "StringHasPrefix", runFunction: run_StringHasPrefix, tags: [.validation, .api, .String]),
  BenchmarkInfo(name: "StringHasPrefixUnicode", runFunction: run_StringHasPrefixUnicode, tags: [.validation, .api, .String]),
  BenchmarkInfo(name: "StringHasSuffix", runFunction: run_StringHasSuffix, tags: [.validation, .api, .String]),
  BenchmarkInfo(name: "StringHasSuffixUnicode", runFunction: run_StringHasSuffixUnicode, tags: [.validation, .api, .String]),
]

// FIXME(string)
public func run_StringHasPrefix(_ N: Int) {
#if _runtime(_ObjC)
  let prefix = "prefix"
  let testString = "prefixedString"
  for _ in 0 ..< N {
    for _ in 0 ..< 100_000 {
      CheckResults(testString.hasPrefix(getString(prefix)))
    }
  }
#endif
}

// FIXME(string)
public func run_StringHasSuffix(_ N: Int) {
#if _runtime(_ObjC)
  let suffix = "Suffixed"
  let testString = "StringSuffixed"
  for _ in 0 ..< N {<commit_msg>benchmarks: Rename 2 benchmarks which were fixed recently.<commit_after>//===--- StringTests.swift ------------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//
import TestsUtils

public let StringTests = [
  BenchmarkInfo(name: "StringEqualPointerComparison", runFunction: run_StringEqualPointerComparison, tags: [.validation, .api, .String]),
  BenchmarkInfo(name: "StringHasPrefixAscii", runFunction: run_StringHasPrefixAscii, tags: [.validation, .api, .String]),
  BenchmarkInfo(name: "StringHasPrefixUnicode", runFunction: run_StringHasPrefixUnicode, tags: [.validation, .api, .String]),
  BenchmarkInfo(name: "StringHasSuffixAscii", runFunction: run_StringHasSuffixAscii, tags: [.validation, .api, .String]),
  BenchmarkInfo(name: "StringHasSuffixUnicode", runFunction: run_StringHasSuffixUnicode, tags: [.validation, .api, .String]),
]

// FIXME(string)
public func run_StringHasPrefixAscii(_ N: Int) {
#if _runtime(_ObjC)
  let prefix = "prefix"
  let testString = "prefixedString"
  for _ in 0 ..< N {
    for _ in 0 ..< 100_000 {
      CheckResults(testString.hasPrefix(getString(prefix)))
    }
  }
#endif
}

// FIXME(string)
public func run_StringHasSuffixAscii(_ N: Int) {
#if _runtime(_ObjC)
  let suffix = "Suffixed"
  let testString = "StringSuffixed"
  for _ in 0 ..< N {
{'fraction_non_alphanumeric': 0.19458494495685807, 'fraction_numerical': 0.011603689378161261, 'mean_word_length': 3.186799501867995, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2353952', 'n_tokens_mistral': 1023, 'n_tokens_neox': 980, 'n_words': 275}