<commit_before>library unittest;

import 'package:unittest/unittest.dart';
import '../lib/mirrors.dart';

export 'package:unittest/unittest.dart';

// fix the testing framework ;-)
void it(String spec, TestFunction body) => test(spec, body);
void xit(String spec, TestFunction body) {}
void iit(String spec, TestFunction body) => solo_test(spec, body);

Matcher toEqual(expected) => equals(expected);
Matcher toBe(expected) => same(expected);
Matcher instanceOf(Type t) => new IsInstanceOfTypeMatcher(t);

Matcher toThrow(Type exceptionClass, String message) =>
  new ThrowsMatcher(new ComplexExceptionMatcher(instanceOf(exceptionClass), toEqual(message)));

Matcher not(Matcher matcher) => new NegateMatcher(matcher);


class NegateMatcher extends BaseMatcher {
  final Matcher _matcher;

  const NegateMatcher(Matcher matcher) : _matcher = matcher;

  bool matches(obj, MatchState ms) {
    return !_matcher.matches(obj, ms);
  }<commit_msg>Testing framework: add missing import<commit_after>library unittest;

import 'package:unittest/unittest.dart';
import '../lib/mirrors.dart';
import 'dart:async';

export 'package:unittest/unittest.dart';

// fix the testing framework ;-)
void it(String spec, TestFunction body) => test(spec, body);
void xit(String spec, TestFunction body) {}
void iit(String spec, TestFunction body) => solo_test(spec, body);

Matcher toEqual(expected) => equals(expected);
Matcher toBe(expected) => same(expected);
Matcher instanceOf(Type t) => new IsInstanceOfTypeMatcher(t);

Matcher toThrow(Type exceptionClass, String message) =>
  new ThrowsMatcher(new ComplexExceptionMatcher(instanceOf(exceptionClass), toEqual(message)));

Matcher not(Matcher matcher) => new NegateMatcher(matcher);


class NegateMatcher extends BaseMatcher {
  final Matcher _matcher;

  const NegateMatcher(Matcher matcher) : _matcher = matcher;

  bool matches(obj, MatchState ms) {
    return !_matcher.matches(obj, ms);
  }
{'fraction_non_alphanumeric': 0.1196271361988607, 'fraction_numerical': 0.0, 'mean_word_length': 6.45945945945946, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 17, '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': '206410', 'n_tokens_mistral': 578, 'n_tokens_neox': 570, 'n_words': 156}