mirror of
https://github.com/dart-lang/sdk
synced 2024-09-15 23:49:47 +00:00
Add fixes for HttpStatus constants
Add rename migrations for all the screaming snake case constants that were renamed to lower camel case during the Dart 2 migraiton. Rename the test from `file.dart` to `io.dart` so that we can test all deprecations for the same import together. Add a test for the same deprecations when imported through `dart:html`. Change-Id: Iee91d88b1b11648e8c65cfcc8d2fcfabac3954ec Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/203820 Auto-Submit: Nate Bosch <nbosch@google.com> Commit-Queue: Phil Quitslund <pquitslund@google.com> Reviewed-by: Lasse R.H. Nielsen <lrn@google.com> Reviewed-by: Phil Quitslund <pquitslund@google.com>
This commit is contained in:
parent
addf391d5b
commit
1948bd6109
|
@ -3,7 +3,7 @@
|
|||
# BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
# Please add new fixes to the top of the file, separated by one blank line
|
||||
# from other fixes. Add corresponding golden tests to
|
||||
# from other fixes. Add corresponding golden tests to
|
||||
# `tests/lib/fix_data_tests` for each new fix.
|
||||
|
||||
# For documentation about this file format, see
|
||||
|
@ -59,4 +59,433 @@ transforms:
|
|||
inClass: 'FileMode'
|
||||
changes:
|
||||
- kind: 'rename'
|
||||
newName: 'writeOnlyAppend'
|
||||
newName: 'writeOnlyAppend'
|
||||
|
||||
- title: "Rename to 'continue_'"
|
||||
date: 2021-06-15
|
||||
element:
|
||||
uris: [ 'dart:io', 'dart:html' ]
|
||||
field: 'CONTINUE'
|
||||
inClass: 'HttpStatus'
|
||||
changes:
|
||||
- kind: 'rename'
|
||||
newName: 'continue_'
|
||||
|
||||
- title: "Rename to 'switchingProtocols'"
|
||||
date: 2021-06-15
|
||||
element:
|
||||
uris: [ 'dart:io', 'dart:html' ]
|
||||
field: 'SWITCHING_PROTOCOLS'
|
||||
inClass: 'HttpStatus'
|
||||
changes:
|
||||
- kind: 'rename'
|
||||
newName: 'switchingProtocols'
|
||||
|
||||
- title: "Rename to 'ok'"
|
||||
date: 2021-06-15
|
||||
element:
|
||||
uris: [ 'dart:io', 'dart:html' ]
|
||||
field: 'OK'
|
||||
inClass: 'HttpStatus'
|
||||
changes:
|
||||
- kind: 'rename'
|
||||
newName: 'ok'
|
||||
|
||||
- title: "Rename to 'created'"
|
||||
date: 2021-06-15
|
||||
element:
|
||||
uris: [ 'dart:io', 'dart:html' ]
|
||||
field: 'CREATED'
|
||||
inClass: 'HttpStatus'
|
||||
changes:
|
||||
- kind: 'rename'
|
||||
newName: 'created'
|
||||
|
||||
- title: "Rename to 'accepted'"
|
||||
date: 2021-06-15
|
||||
element:
|
||||
uris: [ 'dart:io', 'dart:html' ]
|
||||
field: 'ACCEPTED'
|
||||
inClass: 'HttpStatus'
|
||||
changes:
|
||||
- kind: 'rename'
|
||||
newName: 'accepted'
|
||||
|
||||
- title: "Rename to 'nonAuthoritativeInformation'"
|
||||
date: 2021-06-15
|
||||
element:
|
||||
uris: [ 'dart:io', 'dart:html' ]
|
||||
field: 'NON_AUTHORITATIVE_INFORMATION'
|
||||
inClass: 'HttpStatus'
|
||||
changes:
|
||||
- kind: 'rename'
|
||||
newName: 'nonAuthoritativeInformation'
|
||||
|
||||
- title: "Rename to 'noContent'"
|
||||
date: 2021-06-15
|
||||
element:
|
||||
uris: [ 'dart:io', 'dart:html' ]
|
||||
field: 'NO_CONTENT'
|
||||
inClass: 'HttpStatus'
|
||||
changes:
|
||||
- kind: 'rename'
|
||||
newName: 'noContent'
|
||||
|
||||
- title: "Rename to 'resetContent'"
|
||||
date: 2021-06-15
|
||||
element:
|
||||
uris: [ 'dart:io', 'dart:html' ]
|
||||
field: 'RESET_CONTENT'
|
||||
inClass: 'HttpStatus'
|
||||
changes:
|
||||
- kind: 'rename'
|
||||
newName: 'resetContent'
|
||||
|
||||
- title: "Rename to 'partialContent'"
|
||||
date: 2021-06-15
|
||||
element:
|
||||
uris: [ 'dart:io', 'dart:html' ]
|
||||
field: 'PARTIAL_CONTENT'
|
||||
inClass: 'HttpStatus'
|
||||
changes:
|
||||
- kind: 'rename'
|
||||
newName: 'partialContent'
|
||||
|
||||
- title: "Rename to 'multipleChoices'"
|
||||
date: 2021-06-15
|
||||
element:
|
||||
uris: [ 'dart:io', 'dart:html' ]
|
||||
field: 'MULTIPLE_CHOICES'
|
||||
inClass: 'HttpStatus'
|
||||
changes:
|
||||
- kind: 'rename'
|
||||
newName: 'multipleChoices'
|
||||
|
||||
- title: "Rename to 'movedPermanently'"
|
||||
date: 2021-06-15
|
||||
element:
|
||||
uris: [ 'dart:io', 'dart:html' ]
|
||||
field: 'MOVED_PERMANENTLY'
|
||||
inClass: 'HttpStatus'
|
||||
changes:
|
||||
- kind: 'rename'
|
||||
newName: 'movedPermanently'
|
||||
|
||||
- title: "Rename to 'found'"
|
||||
date: 2021-06-15
|
||||
element:
|
||||
uris: [ 'dart:io', 'dart:html' ]
|
||||
field: 'FOUND'
|
||||
inClass: 'HttpStatus'
|
||||
changes:
|
||||
- kind: 'rename'
|
||||
newName: 'found'
|
||||
|
||||
- title: "Rename to 'movedTemporarily'"
|
||||
date: 2021-06-15
|
||||
element:
|
||||
uris: [ 'dart:io', 'dart:html' ]
|
||||
field: 'MOVED_TEMPORARILY'
|
||||
inClass: 'HttpStatus'
|
||||
changes:
|
||||
- kind: 'rename'
|
||||
newName: 'movedTemporarily'
|
||||
|
||||
- title: "Rename to 'seeOther'"
|
||||
date: 2021-06-15
|
||||
element:
|
||||
uris: [ 'dart:io', 'dart:html' ]
|
||||
field: 'SEE_OTHER'
|
||||
inClass: 'HttpStatus'
|
||||
changes:
|
||||
- kind: 'rename'
|
||||
newName: 'seeOther'
|
||||
|
||||
- title: "Rename to 'notModified'"
|
||||
date: 2021-06-15
|
||||
element:
|
||||
uris: [ 'dart:io', 'dart:html' ]
|
||||
field: 'NOT_MODIFIED'
|
||||
inClass: 'HttpStatus'
|
||||
changes:
|
||||
- kind: 'rename'
|
||||
newName: 'notModified'
|
||||
|
||||
- title: "Rename to 'useProxy'"
|
||||
date: 2021-06-15
|
||||
element:
|
||||
uris: [ 'dart:io', 'dart:html' ]
|
||||
field: 'USE_PROXY'
|
||||
inClass: 'HttpStatus'
|
||||
changes:
|
||||
- kind: 'rename'
|
||||
newName: 'useProxy'
|
||||
|
||||
- title: "Rename to 'temporaryRedirect'"
|
||||
date: 2021-06-15
|
||||
element:
|
||||
uris: [ 'dart:io', 'dart:html' ]
|
||||
field: 'TEMPORARY_REDIRECT'
|
||||
inClass: 'HttpStatus'
|
||||
changes:
|
||||
- kind: 'rename'
|
||||
newName: 'temporaryRedirect'
|
||||
|
||||
- title: "Rename to 'badRequest'"
|
||||
date: 2021-06-15
|
||||
element:
|
||||
uris: [ 'dart:io', 'dart:html' ]
|
||||
field: 'BAD_REQUEST'
|
||||
inClass: 'HttpStatus'
|
||||
changes:
|
||||
- kind: 'rename'
|
||||
newName: 'badRequest'
|
||||
|
||||
- title: "Rename to 'unauthorized'"
|
||||
date: 2021-06-15
|
||||
element:
|
||||
uris: [ 'dart:io', 'dart:html' ]
|
||||
field: 'UNAUTHORIZED'
|
||||
inClass: 'HttpStatus'
|
||||
changes:
|
||||
- kind: 'rename'
|
||||
newName: 'unauthorized'
|
||||
|
||||
- title: "Rename to 'paymentRequired'"
|
||||
date: 2021-06-15
|
||||
element:
|
||||
uris: [ 'dart:io', 'dart:html' ]
|
||||
field: 'PAYMENT_REQUIRED'
|
||||
inClass: 'HttpStatus'
|
||||
changes:
|
||||
- kind: 'rename'
|
||||
newName: 'paymentRequired'
|
||||
|
||||
- title: "Rename to 'forbidden'"
|
||||
date: 2021-06-15
|
||||
element:
|
||||
uris: [ 'dart:io', 'dart:html' ]
|
||||
field: 'FORBIDDEN'
|
||||
inClass: 'HttpStatus'
|
||||
changes:
|
||||
- kind: 'rename'
|
||||
newName: 'forbidden'
|
||||
|
||||
- title: "Rename to 'notFound'"
|
||||
date: 2021-06-15
|
||||
element:
|
||||
uris: [ 'dart:io', 'dart:html' ]
|
||||
field: 'NOT_FOUND'
|
||||
inClass: 'HttpStatus'
|
||||
changes:
|
||||
- kind: 'rename'
|
||||
newName: 'notFound'
|
||||
|
||||
- title: "Rename to 'methodNotAllowed'"
|
||||
date: 2021-06-15
|
||||
element:
|
||||
uris: [ 'dart:io', 'dart:html' ]
|
||||
field: 'METHOD_NOT_ALLOWED'
|
||||
inClass: 'HttpStatus'
|
||||
changes:
|
||||
- kind: 'rename'
|
||||
newName: 'methodNotAllowed'
|
||||
|
||||
- title: "Rename to 'notAcceptable'"
|
||||
date: 2021-06-15
|
||||
element:
|
||||
uris: [ 'dart:io', 'dart:html' ]
|
||||
field: 'NOT_ACCEPTABLE'
|
||||
inClass: 'HttpStatus'
|
||||
changes:
|
||||
- kind: 'rename'
|
||||
newName: 'notAcceptable'
|
||||
|
||||
- title: "Rename to 'proxyAuthenticationRequired'"
|
||||
date: 2021-06-15
|
||||
element:
|
||||
uris: [ 'dart:io', 'dart:html' ]
|
||||
field: 'PROXY_AUTHENTICATION_REQUIRED'
|
||||
inClass: 'HttpStatus'
|
||||
changes:
|
||||
- kind: 'rename'
|
||||
newName: 'proxyAuthenticationRequired'
|
||||
|
||||
- title: "Rename to 'requestTimeout'"
|
||||
date: 2021-06-15
|
||||
element:
|
||||
uris: [ 'dart:io', 'dart:html' ]
|
||||
field: 'REQUEST_TIMEOUT'
|
||||
inClass: 'HttpStatus'
|
||||
changes:
|
||||
- kind: 'rename'
|
||||
newName: 'requestTimeout'
|
||||
|
||||
- title: "Rename to 'conflict'"
|
||||
date: 2021-06-15
|
||||
element:
|
||||
uris: [ 'dart:io', 'dart:html' ]
|
||||
field: 'CONFLICT'
|
||||
inClass: 'HttpStatus'
|
||||
changes:
|
||||
- kind: 'rename'
|
||||
newName: 'conflict'
|
||||
|
||||
- title: "Rename to 'gone'"
|
||||
date: 2021-06-15
|
||||
element:
|
||||
uris: [ 'dart:io', 'dart:html' ]
|
||||
field: 'GONE'
|
||||
inClass: 'HttpStatus'
|
||||
changes:
|
||||
- kind: 'rename'
|
||||
newName: 'gone'
|
||||
|
||||
- title: "Rename to 'lengthRequired'"
|
||||
date: 2021-06-15
|
||||
element:
|
||||
uris: [ 'dart:io', 'dart:html' ]
|
||||
field: 'LENGTH_REQUIRED'
|
||||
inClass: 'HttpStatus'
|
||||
changes:
|
||||
- kind: 'rename'
|
||||
newName: 'lengthRequired'
|
||||
|
||||
- title: "Rename to 'preconditionFailed'"
|
||||
date: 2021-06-15
|
||||
element:
|
||||
uris: [ 'dart:io', 'dart:html' ]
|
||||
field: 'PRECONDITION_FAILED'
|
||||
inClass: 'HttpStatus'
|
||||
changes:
|
||||
- kind: 'rename'
|
||||
newName: 'preconditionFailed'
|
||||
|
||||
- title: "Rename to 'requestEntityTooLarge'"
|
||||
date: 2021-06-15
|
||||
element:
|
||||
uris: [ 'dart:io', 'dart:html' ]
|
||||
field: 'REQUEST_ENTITY_TOO_LARGE'
|
||||
inClass: 'HttpStatus'
|
||||
changes:
|
||||
- kind: 'rename'
|
||||
newName: 'requestEntityTooLarge'
|
||||
|
||||
- title: "Rename to 'requestUriTooLong'"
|
||||
date: 2021-06-15
|
||||
element:
|
||||
uris: [ 'dart:io', 'dart:html' ]
|
||||
field: 'REQUEST_URI_TOO_LONG'
|
||||
inClass: 'HttpStatus'
|
||||
changes:
|
||||
- kind: 'rename'
|
||||
newName: 'requestUriTooLong'
|
||||
|
||||
- title: "Rename to 'unsupportedMediaType'"
|
||||
date: 2021-06-15
|
||||
element:
|
||||
uris: [ 'dart:io', 'dart:html' ]
|
||||
field: 'UNSUPPORTED_MEDIA_TYPE'
|
||||
inClass: 'HttpStatus'
|
||||
changes:
|
||||
- kind: 'rename'
|
||||
newName: 'unsupportedMediaType'
|
||||
|
||||
- title: "Rename to 'requestedRangeNotSatisfiable'"
|
||||
date: 2021-06-15
|
||||
element:
|
||||
uris: [ 'dart:io', 'dart:html' ]
|
||||
field: 'REQUESTED_RANGE_NOT_SATISFIABLE'
|
||||
inClass: 'HttpStatus'
|
||||
changes:
|
||||
- kind: 'rename'
|
||||
newName: 'requestedRangeNotSatisfiable'
|
||||
- title: "Rename to 'expectationFailed'"
|
||||
date: 2021-06-15
|
||||
element:
|
||||
uris: [ 'dart:io', 'dart:html' ]
|
||||
field: 'EXPECTATION_FAILED'
|
||||
inClass: 'HttpStatus'
|
||||
changes:
|
||||
- kind: 'rename'
|
||||
newName: 'expectationFailed'
|
||||
|
||||
- title: "Rename to 'upgradeRequired'"
|
||||
date: 2021-06-15
|
||||
element:
|
||||
uris: [ 'dart:io', 'dart:html' ]
|
||||
field: 'UPGRADE_REQUIRED'
|
||||
inClass: 'HttpStatus'
|
||||
changes:
|
||||
- kind: 'rename'
|
||||
newName: 'upgradeRequired'
|
||||
|
||||
- title: "Rename to 'internalServerError'"
|
||||
date: 2021-06-15
|
||||
element:
|
||||
uris: [ 'dart:io', 'dart:html' ]
|
||||
field: 'INTERNAL_SERVER_ERROR'
|
||||
inClass: 'HttpStatus'
|
||||
changes:
|
||||
- kind: 'rename'
|
||||
newName: 'internalServerError'
|
||||
|
||||
- title: "Rename to 'notImplemented'"
|
||||
date: 2021-06-15
|
||||
element:
|
||||
uris: [ 'dart:io', 'dart:html' ]
|
||||
field: 'NOT_IMPLEMENTED'
|
||||
inClass: 'HttpStatus'
|
||||
changes:
|
||||
- kind: 'rename'
|
||||
newName: 'notImplemented'
|
||||
|
||||
- title: "Rename to 'badGateway'"
|
||||
date: 2021-06-15
|
||||
element:
|
||||
uris: [ 'dart:io', 'dart:html' ]
|
||||
field: 'BAD_GATEWAY'
|
||||
inClass: 'HttpStatus'
|
||||
changes:
|
||||
- kind: 'rename'
|
||||
newName: 'badGateway'
|
||||
|
||||
- title: "Rename to 'serviceUnavailable'"
|
||||
date: 2021-06-15
|
||||
element:
|
||||
uris: [ 'dart:io', 'dart:html' ]
|
||||
field: 'SERVICE_UNAVAILABLE'
|
||||
inClass: 'HttpStatus'
|
||||
changes:
|
||||
- kind: 'rename'
|
||||
newName: 'serviceUnavailable'
|
||||
|
||||
- title: "Rename to 'gatewayTimeout'"
|
||||
date: 2021-06-15
|
||||
element:
|
||||
uris: [ 'dart:io', 'dart:html' ]
|
||||
field: 'GATEWAY_TIMEOUT'
|
||||
inClass: 'HttpStatus'
|
||||
changes:
|
||||
- kind: 'rename'
|
||||
newName: 'gatewayTimeout'
|
||||
|
||||
- title: "Rename to 'httpVersionNotSupported'"
|
||||
date: 2021-06-15
|
||||
element:
|
||||
uris: [ 'dart:io', 'dart:html' ]
|
||||
field: 'HTTP_VERSION_NOT_SUPPORTED'
|
||||
inClass: 'HttpStatus'
|
||||
changes:
|
||||
- kind: 'rename'
|
||||
newName: 'httpVersionNotSupported'
|
||||
|
||||
- title: "Rename to 'networkConnectTimeoutError'"
|
||||
date: 2021-06-15
|
||||
element:
|
||||
uris: [ 'dart:io', 'dart:html' ]
|
||||
field: 'NETWORK_CONNECT_TIMEOUT_ERROR'
|
||||
inClass: 'HttpStatus'
|
||||
changes:
|
||||
- kind: 'rename'
|
||||
newName: 'networkConnectTimeoutError'
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
// Copyright (c) 2021, 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.
|
||||
|
||||
import 'dart:io';
|
||||
|
||||
void main() {
|
||||
print(FileMode.APPEND);
|
||||
print(FileMode.READ);
|
||||
print(FileMode.WRITE);
|
||||
print(FileMode.WRITE_ONLY);
|
||||
print(FileMode.WRITE_ONLY_APPEND);
|
||||
}
|
|
@ -1,13 +0,0 @@
|
|||
// Copyright (c) 2021, 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.
|
||||
|
||||
import 'dart:io';
|
||||
|
||||
void main() {
|
||||
print(FileMode.append);
|
||||
print(FileMode.read);
|
||||
print(FileMode.write);
|
||||
print(FileMode.writeOnly);
|
||||
print(FileMode.writeOnlyAppend);
|
||||
}
|
51
tests/lib/fix_data_tests/html.dart
Normal file
51
tests/lib/fix_data_tests/html.dart
Normal file
|
@ -0,0 +1,51 @@
|
|||
// Copyright (c) 2021, 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.
|
||||
|
||||
import 'dart:html';
|
||||
|
||||
void main() {
|
||||
print(HttpStatus.CONTINUE);
|
||||
print(HttpStatus.SWITCHING_PROTOCOLS);
|
||||
print(HttpStatus.OK);
|
||||
print(HttpStatus.CREATED);
|
||||
print(HttpStatus.ACCEPTED);
|
||||
print(HttpStatus.NON_AUTHORITATIVE_INFORMATION);
|
||||
print(HttpStatus.NO_CONTENT);
|
||||
print(HttpStatus.RESET_CONTENT);
|
||||
print(HttpStatus.PARTIAL_CONTENT);
|
||||
print(HttpStatus.MULTIPLE_CHOICES);
|
||||
print(HttpStatus.MOVED_PERMANENTLY);
|
||||
print(HttpStatus.FOUND);
|
||||
print(HttpStatus.MOVED_TEMPORARILY);
|
||||
print(HttpStatus.SEE_OTHER);
|
||||
print(HttpStatus.NOT_MODIFIED);
|
||||
print(HttpStatus.USE_PROXY);
|
||||
print(HttpStatus.TEMPORARY_REDIRECT);
|
||||
print(HttpStatus.BAD_REQUEST);
|
||||
print(HttpStatus.UNAUTHORIZED);
|
||||
print(HttpStatus.PAYMENT_REQUIRED);
|
||||
print(HttpStatus.FORBIDDEN);
|
||||
print(HttpStatus.NOT_FOUND);
|
||||
print(HttpStatus.METHOD_NOT_ALLOWED);
|
||||
print(HttpStatus.NOT_ACCEPTABLE);
|
||||
print(HttpStatus.PROXY_AUTHENTICATION_REQUIRED);
|
||||
print(HttpStatus.REQUEST_TIMEOUT);
|
||||
print(HttpStatus.CONFLICT);
|
||||
print(HttpStatus.GONE);
|
||||
print(HttpStatus.LENGTH_REQUIRED);
|
||||
print(HttpStatus.PRECONDITION_FAILED);
|
||||
print(HttpStatus.REQUEST_ENTITY_TOO_LARGE);
|
||||
print(HttpStatus.REQUEST_URI_TOO_LONG);
|
||||
print(HttpStatus.UNSUPPORTED_MEDIA_TYPE);
|
||||
print(HttpStatus.REQUESTED_RANGE_NOT_SATISFIABLE);
|
||||
print(HttpStatus.EXPECTATION_FAILED);
|
||||
print(HttpStatus.UPGRADE_REQUIRED);
|
||||
print(HttpStatus.INTERNAL_SERVER_ERROR);
|
||||
print(HttpStatus.NOT_IMPLEMENTED);
|
||||
print(HttpStatus.BAD_GATEWAY);
|
||||
print(HttpStatus.SERVICE_UNAVAILABLE);
|
||||
print(HttpStatus.GATEWAY_TIMEOUT);
|
||||
print(HttpStatus.HTTP_VERSION_NOT_SUPPORTED);
|
||||
print(HttpStatus.NETWORK_CONNECT_TIMEOUT_ERROR);
|
||||
}
|
51
tests/lib/fix_data_tests/html.dart.expect
Normal file
51
tests/lib/fix_data_tests/html.dart.expect
Normal file
|
@ -0,0 +1,51 @@
|
|||
// Copyright (c) 2021, 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.
|
||||
|
||||
import 'dart:html';
|
||||
|
||||
void main() {
|
||||
print(HttpStatus.continue_);
|
||||
print(HttpStatus.switchingProtocols);
|
||||
print(HttpStatus.ok);
|
||||
print(HttpStatus.created);
|
||||
print(HttpStatus.accepted);
|
||||
print(HttpStatus.nonAuthoritativeInformation);
|
||||
print(HttpStatus.noContent);
|
||||
print(HttpStatus.resetContent);
|
||||
print(HttpStatus.partialContent);
|
||||
print(HttpStatus.multipleChoices);
|
||||
print(HttpStatus.movedPermanently);
|
||||
print(HttpStatus.found);
|
||||
print(HttpStatus.movedTemporarily);
|
||||
print(HttpStatus.seeOther);
|
||||
print(HttpStatus.notModified);
|
||||
print(HttpStatus.useProxy);
|
||||
print(HttpStatus.temporaryRedirect);
|
||||
print(HttpStatus.badRequest);
|
||||
print(HttpStatus.unauthorized);
|
||||
print(HttpStatus.paymentRequired);
|
||||
print(HttpStatus.forbidden);
|
||||
print(HttpStatus.notFound);
|
||||
print(HttpStatus.methodNotAllowed);
|
||||
print(HttpStatus.notAcceptable);
|
||||
print(HttpStatus.proxyAuthenticationRequired);
|
||||
print(HttpStatus.requestTimeout);
|
||||
print(HttpStatus.conflict);
|
||||
print(HttpStatus.gone);
|
||||
print(HttpStatus.lengthRequired);
|
||||
print(HttpStatus.preconditionFailed);
|
||||
print(HttpStatus.requestEntityTooLarge);
|
||||
print(HttpStatus.requestUriTooLong);
|
||||
print(HttpStatus.unsupportedMediaType);
|
||||
print(HttpStatus.requestedRangeNotSatisfiable);
|
||||
print(HttpStatus.expectationFailed);
|
||||
print(HttpStatus.upgradeRequired);
|
||||
print(HttpStatus.internalServerError);
|
||||
print(HttpStatus.notImplemented);
|
||||
print(HttpStatus.badGateway);
|
||||
print(HttpStatus.serviceUnavailable);
|
||||
print(HttpStatus.gatewayTimeout);
|
||||
print(HttpStatus.httpVersionNotSupported);
|
||||
print(HttpStatus.networkConnectTimeoutError);
|
||||
}
|
56
tests/lib/fix_data_tests/io.dart
Normal file
56
tests/lib/fix_data_tests/io.dart
Normal file
|
@ -0,0 +1,56 @@
|
|||
// Copyright (c) 2021, 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.
|
||||
|
||||
import 'dart:io';
|
||||
|
||||
void main() {
|
||||
print(FileMode.APPEND);
|
||||
print(FileMode.READ);
|
||||
print(FileMode.WRITE);
|
||||
print(FileMode.WRITE_ONLY);
|
||||
print(FileMode.WRITE_ONLY_APPEND);
|
||||
print(HttpStatus.CONTINUE);
|
||||
print(HttpStatus.SWITCHING_PROTOCOLS);
|
||||
print(HttpStatus.OK);
|
||||
print(HttpStatus.CREATED);
|
||||
print(HttpStatus.ACCEPTED);
|
||||
print(HttpStatus.NON_AUTHORITATIVE_INFORMATION);
|
||||
print(HttpStatus.NO_CONTENT);
|
||||
print(HttpStatus.RESET_CONTENT);
|
||||
print(HttpStatus.PARTIAL_CONTENT);
|
||||
print(HttpStatus.MULTIPLE_CHOICES);
|
||||
print(HttpStatus.MOVED_PERMANENTLY);
|
||||
print(HttpStatus.FOUND);
|
||||
print(HttpStatus.MOVED_TEMPORARILY);
|
||||
print(HttpStatus.SEE_OTHER);
|
||||
print(HttpStatus.NOT_MODIFIED);
|
||||
print(HttpStatus.USE_PROXY);
|
||||
print(HttpStatus.TEMPORARY_REDIRECT);
|
||||
print(HttpStatus.BAD_REQUEST);
|
||||
print(HttpStatus.UNAUTHORIZED);
|
||||
print(HttpStatus.PAYMENT_REQUIRED);
|
||||
print(HttpStatus.FORBIDDEN);
|
||||
print(HttpStatus.NOT_FOUND);
|
||||
print(HttpStatus.METHOD_NOT_ALLOWED);
|
||||
print(HttpStatus.NOT_ACCEPTABLE);
|
||||
print(HttpStatus.PROXY_AUTHENTICATION_REQUIRED);
|
||||
print(HttpStatus.REQUEST_TIMEOUT);
|
||||
print(HttpStatus.CONFLICT);
|
||||
print(HttpStatus.GONE);
|
||||
print(HttpStatus.LENGTH_REQUIRED);
|
||||
print(HttpStatus.PRECONDITION_FAILED);
|
||||
print(HttpStatus.REQUEST_ENTITY_TOO_LARGE);
|
||||
print(HttpStatus.REQUEST_URI_TOO_LONG);
|
||||
print(HttpStatus.UNSUPPORTED_MEDIA_TYPE);
|
||||
print(HttpStatus.REQUESTED_RANGE_NOT_SATISFIABLE);
|
||||
print(HttpStatus.EXPECTATION_FAILED);
|
||||
print(HttpStatus.UPGRADE_REQUIRED);
|
||||
print(HttpStatus.INTERNAL_SERVER_ERROR);
|
||||
print(HttpStatus.NOT_IMPLEMENTED);
|
||||
print(HttpStatus.BAD_GATEWAY);
|
||||
print(HttpStatus.SERVICE_UNAVAILABLE);
|
||||
print(HttpStatus.GATEWAY_TIMEOUT);
|
||||
print(HttpStatus.HTTP_VERSION_NOT_SUPPORTED);
|
||||
print(HttpStatus.NETWORK_CONNECT_TIMEOUT_ERROR);
|
||||
}
|
56
tests/lib/fix_data_tests/io.dart.expect
Normal file
56
tests/lib/fix_data_tests/io.dart.expect
Normal file
|
@ -0,0 +1,56 @@
|
|||
// Copyright (c) 2021, 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.
|
||||
|
||||
import 'dart:io';
|
||||
|
||||
void main() {
|
||||
print(FileMode.append);
|
||||
print(FileMode.read);
|
||||
print(FileMode.write);
|
||||
print(FileMode.writeOnly);
|
||||
print(FileMode.writeOnlyAppend);
|
||||
print(HttpStatus.continue_);
|
||||
print(HttpStatus.switchingProtocols);
|
||||
print(HttpStatus.ok);
|
||||
print(HttpStatus.created);
|
||||
print(HttpStatus.accepted);
|
||||
print(HttpStatus.nonAuthoritativeInformation);
|
||||
print(HttpStatus.noContent);
|
||||
print(HttpStatus.resetContent);
|
||||
print(HttpStatus.partialContent);
|
||||
print(HttpStatus.multipleChoices);
|
||||
print(HttpStatus.movedPermanently);
|
||||
print(HttpStatus.found);
|
||||
print(HttpStatus.movedTemporarily);
|
||||
print(HttpStatus.seeOther);
|
||||
print(HttpStatus.notModified);
|
||||
print(HttpStatus.useProxy);
|
||||
print(HttpStatus.temporaryRedirect);
|
||||
print(HttpStatus.badRequest);
|
||||
print(HttpStatus.unauthorized);
|
||||
print(HttpStatus.paymentRequired);
|
||||
print(HttpStatus.forbidden);
|
||||
print(HttpStatus.notFound);
|
||||
print(HttpStatus.methodNotAllowed);
|
||||
print(HttpStatus.notAcceptable);
|
||||
print(HttpStatus.proxyAuthenticationRequired);
|
||||
print(HttpStatus.requestTimeout);
|
||||
print(HttpStatus.conflict);
|
||||
print(HttpStatus.gone);
|
||||
print(HttpStatus.lengthRequired);
|
||||
print(HttpStatus.preconditionFailed);
|
||||
print(HttpStatus.requestEntityTooLarge);
|
||||
print(HttpStatus.requestUriTooLong);
|
||||
print(HttpStatus.unsupportedMediaType);
|
||||
print(HttpStatus.requestedRangeNotSatisfiable);
|
||||
print(HttpStatus.expectationFailed);
|
||||
print(HttpStatus.upgradeRequired);
|
||||
print(HttpStatus.internalServerError);
|
||||
print(HttpStatus.notImplemented);
|
||||
print(HttpStatus.badGateway);
|
||||
print(HttpStatus.serviceUnavailable);
|
||||
print(HttpStatus.gatewayTimeout);
|
||||
print(HttpStatus.httpVersionNotSupported);
|
||||
print(HttpStatus.networkConnectTimeoutError);
|
||||
}
|
Loading…
Reference in a new issue