<commit_before>import 'dart:typeddata';

validate(TypedData list, num expected) {
  for (int i = 0; i < list.length; i++) {
    Expect.equals(expected, list[i]);
  }
}

main() {
  var list = new Int8List(128);
  for (var i = 0; i < list.length; i++) {
    list[i] = 42;
  }
  var ba = list.buffer;

  var slist = new Int16List.view(ba, 0, 32);
  validate(slist, 10794);
  var uslist = new Uint16List.view(ba, 0, 32);
  validate(uslist, 10794);

  var ilist = new Int32List.view(ba, 0, 16);
  validate(ilist, 707406378);
  var uilist = new Uint32List.view(ba, 0, 16);
  validate(uilist, 707406378);
<commit_msg>Fix dartium build break by adding library tag to test. Review URL: https://codereview.chromium.org//12871002<commit_after>// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
//
// Dart test program for testing typed data.

// Library tag to be able to run in html test framework.
library TypedDataTest;

import 'dart:typeddata';

validate(TypedData list, num expected) {
  for (int i = 0; i < list.length; i++) {
    Expect.equals(expected, list[i]);
  }
}

main() {
  var list = new Int8List(128);
  for (var i = 0; i < list.length; i++) {
    list[i] = 42;
  }
  var ba = list.buffer;

  var slist = new Int16List.view(ba, 0, 32);
  validate(slist, 10794);
  var uslist = new Uint16List.view(ba, 0, 32);
  validate(uslist, 10794);

  var ilist = new Int32List.view(ba, 0, 16);
  validate(ilist, 707406378);
  var uilist = new Uint32List.view(ba, 0, 16);
  validate(uilist, 707406378);

{'fraction_non_alphanumeric': 0.13847080072245635, 'fraction_numerical': 0.07465382299819386, 'mean_word_length': 3.565934065934066, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, 'https://': 1, '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': '6071000', 'n_tokens_mistral': 708, 'n_tokens_neox': 603, 'n_words': 197}