Remove upper case constants (#72)
* Remove usage of upper-case constants.
* update SDK constraint
* remove stable from Travis config
diff --git a/.travis.yml b/.travis.yml
index 5b7ab84..2750414 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,8 +1,6 @@
language: dart
dart:
- dev
- - stable
-
dart_task:
- test: -p vm
- test: -p chrome,firefox
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 25215a1..0b295ac 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,7 @@
+## 0.13.3+1
+
+ * Updated SDK version to 2.0.0-dev.17.0
+
## 0.13.3
* Update the signatures of `FilteredElementList.indexOf` and
diff --git a/pubspec.yaml b/pubspec.yaml
index f962aeb..162c2da 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -1,10 +1,10 @@
name: html
-version: 0.13.3
+version: 0.13.3+1
author: Dart Team <misc@dartlang.org>
description: A library for working with HTML documents. Previously known as html5lib.
homepage: https://github.com/dart-lang/html
environment:
- sdk: '>=1.21.0 <2.0.0'
+ sdk: '>=2.0.0-dev.17.0 <2.0.0'
dependencies:
csslib: '>=0.13.2 <0.15.0'
source_span: '>=1.0.0 <2.0.0'
diff --git a/test/parser_test.dart b/test/parser_test.dart
index 69a52a5..f09ae22 100644
--- a/test/parser_test.dart
+++ b/test/parser_test.dart
@@ -112,11 +112,11 @@
/// Extract the name for the test based on the test input data.
_nameFor(String input) {
- // Using JSON.decode to unescape other unicode characters
+ // Using jsonDecode to unescape other unicode characters
var escapeQuote = input
.replaceAll(new RegExp('\\\\.'), '_')
.replaceAll(new RegExp('\u0000'), '_')
.replaceAll('"', '\\"')
.replaceAll(new RegExp('[\n\r\t]'), '_');
- return JSON.decode('"$escapeQuote"');
+ return jsonDecode('"$escapeQuote"');
}
diff --git a/test/tokenizer_test.dart b/test/tokenizer_test.dart
index dba4ece..7432cda 100644
--- a/test/tokenizer_test.dart
+++ b/test/tokenizer_test.dart
@@ -204,10 +204,10 @@
}
Map unescape(Map testInfo) {
- // TODO(sigmundch,jmesserly): we currently use JSON.decode to unescape the
+ // TODO(sigmundch,jmesserly): we currently use jsonDecode to unescape the
// unicode characters in the string, we should use a decoding that works with
// any control characters.
- decode(inp) => inp == '\u0000' ? inp : JSON.decode('"$inp"');
+ decode(inp) => inp == '\u0000' ? inp : jsonDecode('"$inp"');
testInfo["input"] = decode(testInfo["input"]);
for (var token in testInfo["output"]) {
@@ -244,7 +244,7 @@
if (!path.endsWith('.test')) continue;
var text = new File(path).readAsStringSync();
- var tests = JSON.decode(text);
+ var tests = jsonDecode(text);
var testName = pathos.basenameWithoutExtension(path);
var testList = tests['tests'];
if (testList == null) continue;