<commit_before>package classes

import org.scalatest.FunSuite

abstract class Car {
  def sound: String = ""
}

class Porsche extends Car {
  override def sound: String = "prrrr"
}

class Corvette extends Car {
  override def sound: String = "woosh"
}

class Maserati extends Car {
  override def sound: String = "grrrr"
}

object Owner {
  def startEngines: Set[Car] = Set(new Porsche, new Corvette, new Maserati)
}

class ClassesTest extends FunSuite {
  test("classes") {
    val cars = Owner.startEngines
    for (car <- cars) {
      assert(car.sound.nonEmpty)
    }
  }
}<commit_msg>added pattern match to test<commit_after>package classes

import org.scalatest.FunSuite

abstract class Car {
  def sound: String = ""
}

class Porsche extends Car {
  override def sound: String = "prrrr"
}

class Corvette extends Car {
  override def sound: String = "woosh"
}

class Maserati extends Car {
  override def sound: String = "grrrr"
}

object Owner {
  def startEngines: Set[Car] = Set(new Porsche, new Corvette, new Maserati)
}

class ClassesTest extends FunSuite {
  test("classes") {
    val cars = Owner.startEngines
    for (car <- cars) {
      assert(car.sound.nonEmpty)
      car match {
        case p: Porsche => assert(p.sound == "prrrr")
        case c: Corvette => assert(c.sound == "woosh")
        case m: Maserati => assert(m.sound == "grrrr")
        case _ => throw new IllegalArgumentException("Not a car!")
      }
    }
  }
}
{'fraction_non_alphanumeric': 0.10835058661145618, 'fraction_numerical': 0.0, 'mean_word_length': 3.2521994134897363, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, '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': '4369465', 'n_tokens_mistral': 491, 'n_tokens_neox': 471, 'n_words': 147}