-
Notifications
You must be signed in to change notification settings - Fork 229
Test package APIs rather than resource APIs. #1451
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -0,0 +1,99 @@ | |||
// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2016
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
cachePath, | ||
"hosted/localhost%58${await globalPackageServer.port}/bar-1.0.0/" | ||
"lib/resource.txt")) | ||
.toString()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These three statements got wrapped an awful lot. It might be cleaner to declare little local variables for each path.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
print(await Isolate.resolvePackageUri( | ||
Uri.parse('package:foo/resource.txt'))); | ||
} | ||
""") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the same string as the above script, right? If so, declare a constant for it. Ideally stick it somewhere that the run/package_api_test can get to it too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. I didn't share it across files, though, because I couldn't think of a nice semantic thing to call it.
Closes #1446