-
-
Save RedBrogdon/a082c5c4de47de521fef8a3c14aa0a9e to your computer and use it in GitHub Desktop.
DartPad Test #1 - Happy path
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Copyright 2011 the Dart project authors. All rights reserved. | |
Use of this source code is governed by a BSD-style license | |
that can be found in the LICENSE file. --> | |
<h2>This is some HTML, just in case.</h2 | |
> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String stringify(int x, int y) { | |
// Return a formatted string here | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Copyright 2011 the Dart project authors. All rights reserved. */ | |
/* Use of this source code is governed by a BSD-style license */ | |
/* that can be found in the LICENSE file. */ | |
/* Make it blue, so we can see the style is in use */ | |
h2 { | |
color: #00f; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void main() { | |
final str = stringify(2, 3); | |
if (str == '2 3') { | |
_result(true); | |
} else if (str == '23') { | |
_result(false, ['Test failed. It looks like you forgot the space!']); | |
} else if (str == null) { | |
_result(false, ['Test failed. Did you forget to return a value?']); | |
} else { | |
_result(false, ['That\'s not quite right. Keep trying!']); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment