<commit_before># Test classes with a four-level inheritance chain.
class Base
  func: (string) ->
    "zero/#{string}"

  @static: (string) ->
    "static/#{string}"

class FirstChild extends Base
  func: (string) ->
    super('one/') + string

class SecondChild extends FirstChild
  func: (string) ->
    super('two/') + string

class ThirdChild extends SecondChild
  constructor: ->
    @array = [1, 2, 3]

  # Gratuitous comment for testing.
  func: (string) ->
    super('three/') + string

result = (new ThirdChild).func 'four'

ok result is 'zero/one/two/three/four'
ok Base.static('word') is 'static/word'


class TopClass
  constructor: (arg) ->
    @prop = 'top-' + arg

class SuperClass extends TopClass
  constructor: (arg) ->
    super 'super-' + arg

class SubClass extends SuperClass
  constructor: ->
    super 'sub'

ok (new SubClass).prop is 'top-super-sub'


class OneClass
  constructor: (name) -> @name = name

class TwoClass extends OneClass

ok (new TwoClass('three')).name is 'three'


# And now the same tests, but written in the manual style:<commit_msg>Adding a test for Issue #669<commit_after># Test classes with a four-level inheritance chain.
class Base
  func: (string) ->
    "zero/#{string}"

  @static: (string) ->
    "static/#{string}"

class FirstChild extends Base
  func: (string) ->
    super('one/') + string

class SecondChild extends FirstChild
  func: (string) ->
    super('two/') + string

class ThirdChild extends SecondChild
  constructor: ->
    @array = [1, 2, 3]

  # Gratuitous comment for testing.
  func: (string) ->
    super('three/') + string

result = (new ThirdChild).func 'four'

ok result is 'zero/one/two/three/four'
ok Base.static('word') is 'static/word'


class TopClass
  constructor: (arg) ->
    @prop = 'top-' + arg

class SuperClass extends TopClass
  constructor: (arg) ->
    super 'super-' + arg

class SubClass extends SuperClass
  constructor: ->
    super 'sub'

ok (new SubClass).prop is 'top-super-sub'


class OneClass
  constructor: (name) -> @name = name

class TwoClass extends OneClass

Function.prototype.new = -> new this arguments...

ok (TwoClass.new('three')).name is 'three'

delete Function.prototype.new


# And now the same tests, but written in the manual style:
{'fraction_non_alphanumeric': 0.13303769401330376, 'fraction_numerical': 0.003991130820399113, 'mean_word_length': 3.440944881889764, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 24, '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': '7524508', 'n_tokens_mistral': 730, 'n_tokens_neox': 709, 'n_words': 239}