Commit Graph

12 Commits

Author SHA1 Message Date
Alex Bramley aa12177399 My mock is clunky for external use, but works well for internal testing. Switch to gomock. 2011-11-05 09:27:44 +00:00
Alex Bramley 588a3168ac More logging yak-shaving:
* Change Mock API to match mockNetConn Expect* calls.
* Make logging.NewMock take and store *testing.T.
* Add a level-agnostic Expect().
* Make writerMap an externally accessible type.
* Adjust tests to take this shaving into account.
2011-11-05 05:56:45 +00:00
Alex Bramley 049942ff2f Hmm, using a fixed-length filename doesn't work when you're allowing other people to use your mocks. 2011-10-27 18:37:55 +01:00
Alex Bramley 97783df463 Make mock loggers log everything to avoid stupids. 2011-10-27 18:28:43 +01:00
Alex Bramley 2f5d4d86a5 Really sort out indentation. 2011-10-27 18:07:56 +01:00
Alex Bramley 74ef93abde Fix behaviour of CheckWrittenAtLevel() slightly:
1) Adjust alignments for exp/got correctly.
2) Print expected string when nothing logged at level.
3) Check to ensure no unexpected logging occurred at other levels when nothing
   logged at expected level.
2011-10-27 17:48:15 +01:00
Alex Bramley 88a664833e Oops. I was just being fail. 2011-10-22 16:59:28 +01:00
Alex Bramley 63c7915933 Srsly, fffffuuuu. 2011-10-22 16:45:53 +01:00
Alex Bramley eea12a554b Hmm, slice out of range error, wtf x3! 2011-10-22 16:44:28 +01:00
Alex Bramley 1df07d2ff6 Hmm, slice out of range error, wtf x2. 2011-10-22 16:42:24 +01:00
Alex Bramley ebc34cdce5 Hmm, slice out of range error, wtf. 2011-10-22 16:40:47 +01:00
Alex Bramley dee808a263 Move logger mocks to a non-test file so they can be used elsewhere. 2011-10-22 16:15:46 +01:00