diff --git a/README.md b/README.md index 64c74c4..dad3911 100644 --- a/README.md +++ b/README.md @@ -3,14 +3,14 @@ This repo contains a presentation and code samples from a talk I gave at Golang Bangalore Meetup 36 on September 8th 2018. -*The slides can be viewed online [here](https://pshirali.gitlab.io/testing-in-go)* +*The slides can be viewed online [here](https://pshirali.github.io/testing-in-go)* ### View this presentation offline If you have a Go environment, you can run the following to view the slides offline ``` -git clone https://gitlab.com/pshirali/testing-in-go +git clone https://github.com/pshirali/testing-in-go go get -u -v golang.org/x/tools/cmd/present cd testing-in-go present -notes diff --git a/public/Testing_In_Go_files/css.css b/Testing_In_Go_files/css.css similarity index 100% rename from public/Testing_In_Go_files/css.css rename to Testing_In_Go_files/css.css diff --git a/public/Testing_In_Go_files/css_002.css b/Testing_In_Go_files/css_002.css similarity index 100% rename from public/Testing_In_Go_files/css_002.css rename to Testing_In_Go_files/css_002.css diff --git a/public/Testing_In_Go_files/css_003.css b/Testing_In_Go_files/css_003.css similarity index 100% rename from public/Testing_In_Go_files/css_003.css rename to Testing_In_Go_files/css_003.css diff --git a/public/Testing_In_Go_files/notes.js b/Testing_In_Go_files/notes.js similarity index 100% rename from public/Testing_In_Go_files/notes.js rename to Testing_In_Go_files/notes.js diff --git a/public/Testing_In_Go_files/play.js b/Testing_In_Go_files/play.js similarity index 100% rename from public/Testing_In_Go_files/play.js rename to Testing_In_Go_files/play.js diff --git a/public/Testing_In_Go_files/slides.js b/Testing_In_Go_files/slides.js similarity index 100% rename from public/Testing_In_Go_files/slides.js rename to Testing_In_Go_files/slides.js diff --git a/public/Testing_In_Go_files/styles.css b/Testing_In_Go_files/styles.css similarity index 100% rename from public/Testing_In_Go_files/styles.css rename to Testing_In_Go_files/styles.css diff --git a/public/index.html b/index.html similarity index 99% rename from public/index.html rename to index.html index 7b3f345..d1c79d3 100644 --- a/public/index.html +++ b/index.html @@ -12,7 +12,7 @@ @@ -372,7 +372,7 @@

[EX1] Code and results

PASS
-ok      gitlab.com/pshirali/testing-in-go/samples/ex1    0.006s
+ok      github.com/pshirali/testing-in-go/samples/ex1    0.006s
 
@@ -391,7 +391,7 @@

[EX1] Code and results

--- PASS: TestExample (0.00s) sample_test.go:6: Hello World! PASS -ok gitlab.com/pshirali/testing-in-go/samples/ex1 0.006s +ok github.com/pshirali/testing-in-go/samples/ex1 0.006s @@ -576,7 +576,7 @@

[EX2] But, it's still a single test!

adder_test.go:20: -------------------- Adding: [-1 -2] adder_test.go:20: -------------------- Adding: [1 2 3] PASS -ok gitlab.com/pshirali/testing-in-go/samples/ex2 0.007s +ok github.com/pshirali/testing-in-go/samples/ex2 0.007s @@ -706,7 +706,7 @@

[EX2] Table Driven Tests - Using subtests - Output

--- PASS: TestAdderUsingSubtests/Positive (0.00s) adder_test.go:45: -------------------- Adding: [1 2 3] PASS -ok gitlab.com/pshirali/testing-in-go/samples/ex2 0.007s +ok github.com/pshirali/testing-in-go/samples/ex2 0.007s @@ -1281,7 +1281,7 @@

[EX3] Suite - Output

--- PASS: TestCounterSuite/UnsafeCounter/TestCounterIncrementIncreasesValue (0.00s) --- PASS: TestCounterSuite/UnsafeCounter/TestCounterIncrementReset (0.00s) PASS -ok gitlab.com/pshirali/testing-in-go/samples/ex3/test_suite 0.007s +ok github.com/pshirali/testing-in-go/samples/ex3/test_suite 0.007s @@ -1314,7 +1314,7 @@

[EX3] Suite - Addresses of *testing.T and counters

===== Test2 : 0xc0000a6700 *testing.T \_ Counter : 0xc000070308 *unsafe_counter.unsafeCounter PASS -ok gitlab.com/pshirali/testing-in-go/samples/ex3/test_suite 0.007s +ok github.com/pshirali/testing-in-go/samples/ex3/test_suite 0.007s @@ -1399,7 +1399,7 @@

[EX3] Suite - Wrapper behavior

<<< [ RunAllTests -After- ] <<< PASS -ok gitlab.com/pshirali/testing-in-go/samples/ex3/test_suite 0.007s +ok github.com/pshirali/testing-in-go/samples/ex3/test_suite 0.007s @@ -2134,7 +2134,7 @@

Thank you

- +
diff --git a/samples/ex1/testOutput_normal b/samples/ex1/testOutput_normal index fdb695a..56259b0 100644 --- a/samples/ex1/testOutput_normal +++ b/samples/ex1/testOutput_normal @@ -1,2 +1,2 @@ PASS -ok gitlab.com/pshirali/testing-in-go/samples/ex1 0.006s +ok github.com/pshirali/testing-in-go/samples/ex1 0.006s diff --git a/samples/ex1/testOutput_verbose b/samples/ex1/testOutput_verbose index f74b694..897edea 100644 --- a/samples/ex1/testOutput_verbose +++ b/samples/ex1/testOutput_verbose @@ -2,4 +2,4 @@ --- PASS: TestExample (0.00s) sample_test.go:6: Hello World! PASS -ok gitlab.com/pshirali/testing-in-go/samples/ex1 0.006s +ok github.com/pshirali/testing-in-go/samples/ex1 0.006s diff --git a/samples/ex2/adder_test.go b/samples/ex2/adder_test.go index 32ca360..e5f14bb 100644 --- a/samples/ex2/adder_test.go +++ b/samples/ex2/adder_test.go @@ -15,7 +15,7 @@ package adder_test import ( - "gitlab.com/pshirali/testing-in-go/samples/ex2" + "github.com/pshirali/testing-in-go/samples/ex2" "testing" ) diff --git a/samples/ex2/testOutput_tables_singletest b/samples/ex2/testOutput_tables_singletest index 86fa803..8a908f9 100644 --- a/samples/ex2/testOutput_tables_singletest +++ b/samples/ex2/testOutput_tables_singletest @@ -5,4 +5,4 @@ adder_test.go:20: -------------------- Adding: [-1 -2] adder_test.go:20: -------------------- Adding: [1 2 3] PASS -ok gitlab.com/pshirali/testing-in-go/samples/ex2 0.007s +ok github.com/pshirali/testing-in-go/samples/ex2 0.007s diff --git a/samples/ex2/testOutput_tables_subtest b/samples/ex2/testOutput_tables_subtest index e43e538..91af552 100644 --- a/samples/ex2/testOutput_tables_subtest +++ b/samples/ex2/testOutput_tables_subtest @@ -13,4 +13,4 @@ --- PASS: TestAdderUsingSubtests/Positive (0.00s) adder_test.go:45: -------------------- Adding: [1 2 3] PASS -ok gitlab.com/pshirali/testing-in-go/samples/ex2 0.007s +ok github.com/pshirali/testing-in-go/samples/ex2 0.007s diff --git a/samples/ex3/builder_dump/builder_dump.go b/samples/ex3/builder_dump/builder_dump.go index ba58bf5..9ee3b9a 100644 --- a/samples/ex3/builder_dump/builder_dump.go +++ b/samples/ex3/builder_dump/builder_dump.go @@ -18,8 +18,8 @@ package main // AVOID: '. go test -d ===== Test2 : 0xc0000a6700 *testing.T \_ Counter : 0xc000070308 *unsafe_counter.unsafeCounter PASS -ok gitlab.com/pshirali/testing-in-go/samples/ex3/test_suite 0.007s +ok github.com/pshirali/testing-in-go/samples/ex3/test_suite 0.007s diff --git a/samples/ex3/test_suite/suite_output b/samples/ex3/test_suite/suite_output index 8c6f142..829e351 100644 --- a/samples/ex3/test_suite/suite_output +++ b/samples/ex3/test_suite/suite_output @@ -15,4 +15,4 @@ samples/ex3/test_suite $> go test -v --- PASS: TestCounterSuite/UnsafeCounter/TestCounterIncrementIncreasesValue (0.00s) --- PASS: TestCounterSuite/UnsafeCounter/TestCounterIncrementReset (0.00s) PASS -ok gitlab.com/pshirali/testing-in-go/samples/ex3/test_suite 0.007s +ok github.com/pshirali/testing-in-go/samples/ex3/test_suite 0.007s diff --git a/samples/ex3/test_suite/suite_wrap b/samples/ex3/test_suite/suite_wrap index fde7081..f124da7 100644 --- a/samples/ex3/test_suite/suite_wrap +++ b/samples/ex3/test_suite/suite_wrap @@ -19,4 +19,4 @@ samples/ex3/test_suite $> go test -w <<< [ RunAllTests -After- ] <<< PASS -ok gitlab.com/pshirali/testing-in-go/samples/ex3/test_suite 0.007s \ No newline at end of file +ok github.com/pshirali/testing-in-go/samples/ex3/test_suite 0.007s \ No newline at end of file diff --git a/testing-in-go.slide b/testing-in-go.slide index fe91da5..23f6e2e 100644 --- a/testing-in-go.slide +++ b/testing-in-go.slide @@ -9,7 +9,7 @@ Tags: golang, patterns, testing, unittest, helpers, fixtures, suite Praveen G Shirali praveengshirali@gmail.com -https://gitlab.com/pshirali/testing-in-go +https://github.com/pshirali/testing-in-go