Commit Graph

383 Commits

Author SHA1 Message Date
Alex Bramley 75112d67e2 More nick tests. 2011-10-27 18:43:34 +01:00
Alex Bramley 1c39dbecbb Remove extraneous logging level setting. 2011-10-27 18:43:08 +01: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 748db6b5d2 Test for dissociation, also ensure both nick and channel passed to {A,Di}ssociate are currently tracked. 2011-10-27 17:54:23 +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 47dd5b3430 We need to be able to get at ChanPrivs easily. 2011-10-27 17:03:01 +01:00
Alex Bramley 2603e0984c Test nick <-> channel association. 2011-10-27 16:55:33 +01:00
Alex Bramley 93508c79f1 Similar nick <-> channel dissociation tests in DelChannel(). 2011-10-27 16:41:56 +01:00
Alex Bramley 8771f1db77 Test nick<->channel dissociation in DelNick(). 2011-10-27 16:04:45 +01:00
Alex Bramley 6ded98b9e5 Moar testing and updates. 2011-10-22 23:58:06 +01:00
Alex Bramley 1fbd0a8b17 Switch to using and propagating logger. 2011-10-22 23:57:22 +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 4ee7aac968 oops, this is not a Logger. 2011-10-22 16:18:57 +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
Alex Bramley 2467e5cc93 More tests for the logging package. 2011-10-22 15:43:13 +01:00
Alex Bramley c769723596 Rewrite logging package for great justice.
Allowing people to use the static functions to log things makes testing
hard, so I've removed them. I've also rewritten things to allow logging
different levels to separate files.
2011-10-22 12:06:18 +01:00
Alex Bramley 7be7e79c78 Oops, missed a bit. 2011-10-20 00:23:54 +01:00
Alex Bramley 111a23d87c Epic refactor of the refactor. 2011-10-20 00:10:33 +01:00
Alex Bramley 7f6e5fc7d9 Use NewNick and NewChannel in tests. 2011-10-13 23:19:31 +01:00
Alex Bramley 2c333e0e9a Ditch initialise() functions and just make constructors better. 2011-10-13 22:48:04 +01:00
Alex Bramley 6266eba245 Slight fixes to NewChannel and tests for st's Channel methods. 2011-10-13 22:31:09 +01:00
Alex Bramley 9163b9af7a Slight fixes to ReNick and tests for the rest of st's Nick methods. 2011-10-13 20:44:44 +01:00
Alex Bramley 4c6c503069 Beginning of state tracker unit tests. 2011-10-12 23:06:46 +01:00
Alex Bramley b2ac2929d2 Break state tracker into multiple files. 2011-10-12 22:59:52 +01:00
Alex Bramley a26a940e6d Comment changes and cosmetics for state pkg. 2011-10-08 10:57:10 +01:00
Alex Bramley f128ce84b4 Start of breaking out state tracking into separate package. 2011-10-08 10:42:15 +01:00
Alex Bramley a0020f4e62 Method to initialise tracker memory. 2011-10-08 10:40:58 +01:00
Alex Bramley d072abbb76 Give nicks an awareness of me. 2011-10-07 00:19:31 +01:00
Alex Bramley 7a17ee9eb5 State tracking refactor completer. 2011-10-06 23:54:34 +01:00
Alex Bramley e36caa3a3d Merge branch 'logging' into nickchan-refactor
Conflicts:
	client/nickchan.go

Fix up some inconsistencies in the beginning of the nickchan refactor too.
2011-10-06 22:33:06 +01:00
Alex Bramley 47de788c4c Missed removal of conn.Debug. 2011-10-06 21:37:41 +01:00
Alex Bramley a4ac0dd1b7 Update README, fix whitespace fail. 2011-10-06 21:33:02 +01:00
Alex Bramley d119e6bca0 Update example client. 2011-10-06 21:28:01 +01:00
Alex Bramley 3e1b2c0f81 Turns out gofmt isn't big on spaces sometimes. 2011-09-29 22:58:04 +01:00
Alex Bramley de66051d07 Convert conn.Err into logging.
Also, remove all error-side-effect testing cos it was a bit shit.
First step on the long road to refactoring the nick/chan state tracking
and making everything more testable and mockable with interfaces.
2011-09-29 22:54:54 +01:00
Alex Bramley 9773b47969 Maintain constant call depth in logging to ensure correct line numbers. More tests needed, too lazy. 2011-09-29 22:45:26 +01:00
Alex Bramley 26a482d8ea Using two flagsets on os.Args causes confusion. 2011-09-29 21:31:05 +01:00
Alex Bramley d07471b93a Simpleish level-based logging library and the start of some tests. 2011-09-28 23:47:30 +01:00
Alex Bramley eb6ac4ce05 Tracking wip. 2011-09-28 20:48:58 +01:00
Alex Bramley c400a2141a Run gofmt over code, it's been a while. 2011-09-12 23:25:09 +01:00
Alex Bramley 18c20080e8 Test handler for 671 replies. 2011-09-12 23:21:40 +01:00
Alex Bramley b0e0be0fe3 Check all nicks against current channel contents for 353 handler. 2011-09-12 23:21:15 +01:00
Alex Bramley 6c1d345f0b Test handler for 353 replies. 2011-09-12 23:14:08 +01:00
Alex Bramley 9d896f2693 Test for 352 RPL_WHOREPLY. 2011-09-11 11:01:28 +01:00