Jump to content
  • Advertisement
Sign in to follow this  
  • entries
  • comments
  • views

Private Spi-ies are watching you

Sign in to follow this  


Class reunion was fantastic. I may marry that one chick...

Well, the spies have it.

You'll see in the responses to the last Verg-o-nomics entry that I'd screwed up the implementation of the spies, and that's what's caused all the pain.

Stubbing your foot on the inheritance tree

It stands to reason that you should use 100% configurable spies/stubs so that they return 100% predictable results for the indirect inputs to your SUT ... you can even set the stubs to fail on purpose and exercise a different facet of your SUT.

If, on the other hand, you're just lazy (like I was) and directly subclass the real components or "DOCs" to create your spy/stub classes, you may have to roll real test data, or your tests may crash!

Tests have been much smoother so far... though I've been mostly refactoring to remove key components from classes who were delegating to too many delegatees... and consolidating them by overall responsibility into larger delegatees.

You can take a peek at the actual refactoring on the Death Star whiteboard... it's the PixelConverter template being extracted from the PixelDepthToScreen template... which will be renamed 'BitdepthToScreen'.

Calm waters

Overall, TDD has been a calming influence and steadying force throughout... because refactoring is painless, and I know right away if I've broken something when the tests squeal.

It shouldn't be too long before this is done.

An experiment

I'm going to experiment with putting up a step-by-step TDD session (warts and all) soon... as soon as I can figure out how to record the session (S-Video out to VCR?) and then translate it.

Who knew "Tile Loading" would be the major component, in contrast to "Tile Rendering", or even "Tile Map Scrolling"?


Sign in to follow this  


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!