Skip to content

Commit

Permalink
Added new tests
Browse files Browse the repository at this point in the history
  • Loading branch information
MTelling committed Apr 28, 2017
1 parent bb0e54c commit 37709ce
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 1 deletion.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,5 @@ node_modules/
.gradle/
.idea/
dist/
Testing/
.DS_Store
storedUsers.json
35 changes: 35 additions & 0 deletions Testing/Tests/Challenge_Five.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"name": "Find the n'th prime number.",
"description": "Given n as input, return the n'th prime.\n\nExample:\nGiven args[0] = \"10\" return 23.",
"filename": "Challenge_Five",
"tests": [
{
"arguments": [
"10"
],
"expectedReturn": 23
},
{
"arguments": [
"1000"
],
"expectedReturn": 7907
},
{
"arguments": [
"25000"
],
"expectedReturn": 287107
},
{
"arguments": [
"1"
],
"expectedReturn": 2
}
],
"initialCode" : {
"java" : "public class Program {\n\tpublic Object run(String[] args) {\n\t\t//Type your code here...\n\t\treturn -1;\n\t}\n}",
"javascript" : "function program(args) {\n\treturn -1;\n}"
}
}
41 changes: 41 additions & 0 deletions Testing/Tests/Challenge_Six.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"name": "Palindromes",
"description": "Given a string as input, return true if the string is a palindrome and false if not.\nA palindrome is a word that is the same if you read it backwards as forwards.\n\nExamples:\nGiven args[0] = \"abba\" return true.\nGiven args[0] = \"abca\" return false.",
"filename": "Challenge_Six",
"tests": [
{
"arguments": [
"Copenhacks"
],
"expectedReturn": false
},
{
"arguments": [
"abba"
],
"expectedReturn": true
},
{
"arguments": [
"abbba"
],
"expectedReturn": true
},
{
"arguments": [
"a"
],
"expectedReturn": true
},
{
"arguments": [
"abca"
],
"expectedReturn": false
}
],
"initialCode" : {
"java" : "public class Program {\n\tpublic Object run(String[] args) {\n\t\t//Type your code here...\n\t\treturn false;\n\t}\n}",
"javascript" : "function program(args) {\n\treturn false;\n}"
}
}

0 comments on commit 37709ce

Please sign in to comment.