Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(342)

Unified Diff: tests/standalone/io/internet_address_test.dart

Issue 17640008: Add reverse dns lookup as a method on InternetAddress. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sdk/lib/io/socket.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/io/internet_address_test.dart
diff --git a/tests/standalone/io/internet_address_test.dart b/tests/standalone/io/internet_address_test.dart
index d902ccd9d8fd04a7dcb70ae79358f4db570d7dae..120cacc84e1f718ad9236b2b62cc2494ce2351fc 100644
--- a/tests/standalone/io/internet_address_test.dart
+++ b/tests/standalone/io/internet_address_test.dart
@@ -32,6 +32,21 @@ void testDefaultAddresses() {
Expect.equals("::", any6.address);
}
+void testReverseLookup() {
+ InternetAddress.lookup('localhost').then((addrs) {
+ addrs.first.reverse().then((addr) {
+ Expect.equals('localhost', addr.host);
+ });
+ });
+
+ InternetAddress.lookup('127.0.0.1').then((addrs) {
+ addrs.first.reverse().then((addr) {
+ Expect.equals('localhost', addr.host);
+ });
+ });
+}
+
void main() {
testDefaultAddresses();
+ testReverseLookup();
}
« no previous file with comments | « sdk/lib/io/socket.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698