Last active
September 3, 2020 12:32
-
-
Save amondnet/fcda215f5d41551e96ca49b4d04b174c to your computer and use it in GitHub Desktop.
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) { | |
// TODO: Return a formatted string here | |
// TODO: 여기서 문자열을 반화하세요. | |
} |
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 '$x $y'; | |
} |
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
final errs = <String>[]; | |
void main() { | |
try { | |
var result = stringify(1, 2); | |
if (result != '1 2') { | |
errs.add("stringify(1, 2) 는 '1 2' 를 반환해야 합니다."); | |
} | |
result = stringify(3, 4); | |
if (result != '3 4') { | |
errs.add("stringify(3, 4) 는 '3 4' 를 반환해야 합니다."); | |
} | |
} catch (e) { | |
errs.add( | |
'Tried run stringify and received an exception: ${e.runtimeType}.'); | |
} | |
if (errs.isEmpty) { | |
_result(true); | |
} else { | |
_result(false, errs); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment