<commit_before>library AudioContextTest;
import 'package:unittest/unittest.dart';
import 'package:unittest/html_individual_config.dart';
import 'dart:html';
import 'dart:typed_data';
import 'dart:web_audio';
import 'dart:async';

main() {

  useHtmlIndividualConfiguration();

  var isAudioContext =
      predicate((x) => x is AudioContext, 'is an AudioContext');

  group('supported', () {
    test('supported', () {
      expect(AudioContext.supported, true);
    });
  });

  group('functional', () {
    test('constructorTest', () {
      if(AudioContext.supported) {
        var ctx = new AudioContext();
        expect(ctx, isNotNull);
        expect(ctx, isAudioContext);
      }
    });

    test('createBuffer', () {
      if(AudioContext.supported) {
        var ctx = new AudioContext();
        Float32List view = new Float32List.fromList([]);
        try {
          // Test that native overload is chosen correctly. Native
          // implementation should throw 'SyntaxError' DomException because the
          // buffer is empty.
          AudioBuffer buffer = ctx.createBufferFromBuffer(view.buffer, false);
        } catch (e) {
          expect(e.name, DomException.SYNTAX);
        }
      }
    });

    test('audioRenames', () {
      if(AudioContext.supported) {
        AudioContext context = new AudioContext();<commit_msg>Remove invalid portion of test<commit_after>library AudioContextTest;
import 'package:unittest/unittest.dart';
import 'package:unittest/html_individual_config.dart';
import 'dart:html';
import 'dart:typed_data';
import 'dart:web_audio';
import 'dart:async';

main() {

  useHtmlIndividualConfiguration();

  var isAudioContext =
      predicate((x) => x is AudioContext, 'is an AudioContext');

  group('supported', () {
    test('supported', () {
      expect(AudioContext.supported, true);
    });
  });

  group('functional', () {
    test('constructorTest', () {
      if(AudioContext.supported) {
        var ctx = new AudioContext();
        expect(ctx, isNotNull);
        expect(ctx, isAudioContext);
      }
    });

    test('audioRenames', () {
      if(AudioContext.supported) {
        AudioContext context = new AudioContext();
{'fraction_non_alphanumeric': 0.13738019169329074, 'fraction_numerical': 0.0018256503879507074, 'mean_word_length': 3.183206106870229, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '799935', 'n_tokens_mistral': 650, 'n_tokens_neox': 622, 'n_words': 132}