<commit_before>package dataclass

import shapeless.test.illTyped
import utest._

import scala.concurrent.Future

object OneFieldTests extends TestSuite {
  val tests = Tests {
    @data class Foo(a: Int)
    "equals" - {
      * - {
        val foo = Foo(1)
        val foo2 = Foo(1)
        assert(foo == foo2)
      }
      * - {
        val foo = Foo(1)
        val foo2 = Foo(3)
        assert(foo != foo2)
      }
    }
    "toString" - {
      val foo = Foo(1)
      val str = foo.toString
      val expected = "Foo(1)"
      assert(str == expected)
    }
    "class constructor is private" - {
      illTyped("""
        val foo = new Foo(3)
      """, "constructor Foo in class Foo cannot be accessed .*")
    }
    "accessor" - {
      val foo = Foo(2)
      assert(foo.a == 2)
    }
    "setter" - {
      val foo = Foo(1)
      val foo2 = foo.withA(2)
      assert(foo.a == 1)
      assert(foo2.a == 2)
    }

    "tuple" - {
      @data class Foo0(a: Int) {
        def tuple0 = tuple
      }<commit_msg>Longer field name in test<commit_after>package dataclass

import shapeless.test.illTyped
import utest._

import scala.concurrent.Future

object OneFieldTests extends TestSuite {
  val tests = Tests {
    @data class Foo(count: Int)
    "equals" - {
      * - {
        val foo = Foo(1)
        val foo2 = Foo(1)
        assert(foo == foo2)
      }
      * - {
        val foo = Foo(1)
        val foo2 = Foo(3)
        assert(foo != foo2)
      }
    }
    "toString" - {
      val foo = Foo(1)
      val str = foo.toString
      val expected = "Foo(1)"
      assert(str == expected)
    }
    "class constructor is private" - {
      illTyped("""
        val foo = new Foo(3)
      """, "constructor Foo in class Foo cannot be accessed .*")
    }
    "accessor" - {
      val foo = Foo(2)
      assert(foo.count == 2)
    }
    "setter" - {
      val foo = Foo(1)
      val foo2 = foo.withCount(2)
      assert(foo.count == 1)
      assert(foo2.count == 2)
    }

    "tuple" - {
      @data class Foo0(a: Int) {
        def tuple0 = tuple
      }
{'fraction_non_alphanumeric': 0.1298449612403101, 'fraction_numerical': 0.020348837209302327, 'mean_word_length': 1.6714100905562743, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1450413', 'n_tokens_mistral': 742, 'n_tokens_neox': 710, 'n_words': 186}