<commit_before>import ceylon.time { Period, Duration, time, TimeRange, Time }
import ceylon.test { assertEquals, assertTrue, assertFalse, suite }
import ceylon.time.base { milliseconds, seconds, minutes }

TimeRange firstQuarterDay = time(0, 0).rangeTo(time(6, 0));
TimeRange firstQuarterDayReverse = time(6,0).rangeTo(time(0,0));
TimeRange lastQuarterDay = time(18, 0).rangeTo(time(23, 59));

shared void runTimeRangeTests(String suiteName="TimeRange tests") {
    suite(suiteName,
    "Testingn time range equals" -> testEqualsTimeRange,
    "Testingn time range not equals inverted" -> testNotEqualsTimeRangeInverted,
    "Testingn time range step" -> testStepTime,
    "Testingn time range any exist time" -> testAnyExistTime,
    "Testingn time range any not exist time" -> testAnyNotExistTime,
    "Testingn time range" -> testRangeTime,
    "Testingn time range four minutes" -> testRangeTimeFourMinutes,
    "Testingn time range interval reverse" -> testIntervalTimeReverse,
    "Testingn time range gap" -> testGapTime,
    "Testingn time range overlap" -> testOverlapTime,
    "Testingn time range step milliseconds reverse" -> testStepMillisReverseTime,
    "Testingn time range step seconds reverse" -> testStepSecondsReverseTime,
    "Testingn time range step minutes reverse" -> testStepMinutesReverseTime,
    "Testingn time range contains" -> testContainsTime,
    "Testingn time range gap empty" -> testGapTimeEmpty,
    "Testingn time range overlap empty" -> testOverlapTimeEmpty,
    "Testingn time range gap rules AB < CD" -> testGapRulesABSmallerCD_Time,
    "Testingn time range gap rules AB > CD" -> testGapRulesABHigherCD_Time,
    "Testingn time range overlap rules AB < CD" -> testOverlapRulesABSmallerCD_Time,
    "Testingn time range overlap rules AB > CD" -> testOverlapRulesABHigherCD_Time
);
}

shared void testEqualsTimeRange() {
    assertTrue(firstQuarterDay.equals(time(0,0).rangeTo(time(6,0))));
}

shared void testNotEqualsTimeRangeInverted() {
    assertFalse(firstQuarterDay.equals(time(6,0).rangeTo(time(0,0))));
}

shared void testStepTime() {
    assertEquals(milliseconds, firstQuarterDay.step);
}

shared void testAnyExistTime() {
    assertTrue(firstQuarterDay.any( (Time time) => time.minutes == 1));
}

shared void testAnyNotExistTime() {
    assertFalse(time(0, 0).rangeTo(time(1, 0)).any(( Time time ) => time.seconds == 91));
}

shared void testRangeTime() {<commit_msg>fix typo in test code<commit_after>import ceylon.time { Period, Duration, time, TimeRange, Time }
import ceylon.test { assertEquals, assertTrue, assertFalse, suite }
import ceylon.time.base { milliseconds, seconds, minutes }

TimeRange firstQuarterDay = time(0, 0).rangeTo(time(6, 0));
TimeRange firstQuarterDayReverse = time(6,0).rangeTo(time(0,0));
TimeRange lastQuarterDay = time(18, 0).rangeTo(time(23, 59));

shared void runTimeRangeTests(String suiteName="TimeRange tests") {
    suite(suiteName,
    "Testing time range equals" -> testEqualsTimeRange,
    "Testing time range not equals inverted" -> testNotEqualsTimeRangeInverted,
    "Testing time range step" -> testStepTime,
    "Testing time range any exist time" -> testAnyExistTime,
    "Testing time range any not exist time" -> testAnyNotExistTime,
    "Testing time range" -> testRangeTime,
    "Testing time range four minutes" -> testRangeTimeFourMinutes,
    "Testing time range interval reverse" -> testIntervalTimeReverse,
    "Testing time range gap" -> testGapTime,
    "Testing time range overlap" -> testOverlapTime,
    "Testing time range step milliseconds reverse" -> testStepMillisReverseTime,
    "Testing time range step seconds reverse" -> testStepSecondsReverseTime,
    "Testing time range step minutes reverse" -> testStepMinutesReverseTime,
    "Testing time range contains" -> testContainsTime,
    "Testing time range gap empty" -> testGapTimeEmpty,
    "Testing time range overlap empty" -> testOverlapTimeEmpty,
    "Testing time range gap rules AB < CD" -> testGapRulesABSmallerCD_Time,
    "Testing time range gap rules AB > CD" -> testGapRulesABHigherCD_Time,
    "Testing time range overlap rules AB < CD" -> testOverlapRulesABSmallerCD_Time,
    "Testing time range overlap rules AB > CD" -> testOverlapRulesABHigherCD_Time
);
}

shared void testEqualsTimeRange() {
    assertTrue(firstQuarterDay.equals(time(0,0).rangeTo(time(6,0))));
}

shared void testNotEqualsTimeRangeInverted() {
    assertFalse(firstQuarterDay.equals(time(6,0).rangeTo(time(0,0))));
}

shared void testStepTime() {
    assertEquals(milliseconds, firstQuarterDay.step);
}

shared void testAnyExistTime() {
    assertTrue(firstQuarterDay.any( (Time time) => time.minutes == 1));
}

shared void testAnyNotExistTime() {
    assertFalse(time(0, 0).rangeTo(time(1, 0)).any(( Time time ) => time.seconds == 91));
}

shared void testRangeTime() {
{'fraction_non_alphanumeric': 0.10853355426677713, 'fraction_numerical': 0.012427506213753107, 'mean_word_length': 5.013698630136986, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 51, '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': '3827281', 'n_tokens_mistral': 1482, 'n_tokens_neox': 1441, 'n_words': 402}