Skip to content

Instantly share code, notes, and snippets.

View adilw3nomad's full-sized avatar

adilw3nomad adilw3nomad

  • Somewhere
View GitHub Profile
package main
import (
"bufio"
"encoding/csv"
"fmt"
"log"
"os"
)
package main
import (
"bufio"
"encoding/csv"
"fmt"
"log"
"os"
)
package main
import (
"bufio"
"encoding/csv"
"fmt"
"log"
"os"
)
package main
import (
"bufio"
"encoding/csv"
"fmt"
"log"
"os"
"strings"
)
package main
import (
"bufio"
"encoding/csv"
"fmt"
"io"
"log"
"os"
"strings"
package main
import (
"encoding/csv"
"fmt"
"log"
"os"
)
func main() {
go
package main
import (
"bufio"
"encoding/csv"
"fmt"
"log"
"os"
"strings"
go
package main
import “testing”
func TestCompareAnswer(t *testing.T) {
got := CompareAnswer(“3”, “3”)
if got != true {
t.Errorf(“CompareAnswer = %v; want true”, got)
}
go
func TestCheckAnswer(t *testing.T) {
got := CheckAnswer(“3”, “3”)
if got != true {
t.Errorf(“CheckAnswer = %v; want true”, got)
}
}
go
func TestCheckAnswer(t *testing.T) {
gotCorrect := CheckAnswer(“3”, “3”)
if gotCorrect != “Correct! Well done” {
t.Errorf(“CheckAnswer = %v; want ‘Correct! Well Done’”, gotCorrect)
}
gotIncorrect := CheckAnswer(“3”, “2”)
if gotIncorrect != “WRONG! Answer is: 2” {
t.Errorf(“CheckAnswer = %v; want ‘WRONG! Answer is: 2’”, gotIncorrect)
}