Files
sdk/pkg/http/test/streamed_request_test.dart
T
nweiz@google.com c590e8ae0c Switch pkg packages, pub, and dartdoc to use package: imports.
This also changes the SDK layout by replacing the "pkg" directory, which
contained the full source of all the packages needed by pub and dartdoc, with a
"packages" directory that contains only their lib directories. This directory is
used as the package root for pub and dartdoc when run from the SDK.

BUG=6745

Review URL: https://codereview.chromium.org//12782016

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20640 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-28 20:27:28 +00:00

22 lines
639 B
Dart

// Copyright (c) 2012, 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.
library streamed_request_test;
import 'dart:io';
import 'package:http/http.dart' as http;
import 'package:unittest/unittest.dart';
import 'utils.dart';
void main() {
test('#finalize freezes contentLength', () {
var request = new http.StreamedRequest('POST', dummyUrl);
request.finalize();
expect(request.contentLength, equals(-1));
expect(() => request.contentLength = 10, throwsStateError);
});
}