<commit_before>// RUN: %empty-directory(%t)

// RUN: %target-swift-frontend -parse -enable-bare-slash-regex -disable-availability-checking -experimental-skip-all-function-bodies -stats-output-dir %t %s
// RUN: %{python} %utils/process-stats-dir.py --set-csv-baseline %t/stats.csv %t
// RUN: %FileCheck -input-file %t/stats.csv %s

// REQUIRES: swift_in_compiler

// Make sure we can skip in all of the below cases.

// The printing implementation differs in asserts and no-asserts builds, it will
// either print `"Parse.NumFunctionsParsed" 0` or not print it at all. Make sure
// we don't output any non-zero value.
// CHECK-NOT: {{"Parse.NumFunctionsParsed" [^0]}}

// Balanced `{}`, so okay.
func a() { / {}/ }
func b() { / \{}/ }
func c() { / {"{"}/ }

// Some cases of infix '/' that we should continue to skip.
func d() {
  _ = 1 / 2 + 3 * 4
  _ = 1 / 2 / 3 / 4
}
func e() {<commit_msg>Ensure that there is at least one parse error in this test<commit_after>// RUN: %empty-directory(%t)

// RUN: %target-swift-frontend -parse -enable-bare-slash-regex -disable-availability-checking -experimental-skip-all-function-bodies -verify -stats-output-dir %t %s
// RUN: %{python} %utils/process-stats-dir.py --set-csv-baseline %t/stats.csv %t
// RUN: %FileCheck -input-file %t/stats.csv %s

// REQUIRES: swift_in_compiler

// Make sure we can skip in all of the below cases.

// The printing implementation differs in asserts and no-asserts builds, it will
// either print `"Parse.NumFunctionsParsed" 0` or not print it at all. Make sure
// we don't output any non-zero value.
// CHECK-NOT: {{"Parse.NumFunctionsParsed" [^0]}}

// Ensures there is a parse error
var : Int // expected-error{{expected pattern}}

// Balanced `{}`, so okay.
func a() { / {}/ }
func b() { / \{}/ }
func c() { / {"{"}/ }

// Some cases of infix '/' that we should continue to skip.
func d() {
  _ = 1 / 2 + 3 * 4
  _ = 1 / 2 / 3 / 4
}
func e() {
{'fraction_non_alphanumeric': 0.1703125, 'fraction_numerical': 0.010416666666666666, 'mean_word_length': 2.977225672877847, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5453004', 'n_tokens_mistral': 704, 'n_tokens_neox': 655, 'n_words': 220}