Unit Test 4: Syntax Highlighting

Summary Unit test to illustrate syntax highlighting for code blocks.

This unit test determines if syntax highlighting is working correctly.

Here's some code illustrating a snippet of the Command design pattern.

public void Undo(int levels)
{
  Console.WriteLine("\n---- Undo {0} levels ", levels);
  // Perform undo operations
  for (int i = 0; i < levels; i++)
  {
    if (current > 0)
    {
      Command command = commands[--current] as Command;
      command.UnExecute();
    }
  }
}

Unclassified code:

public void LongBlock() {
  Factory f = new MassivelyVerboseAbstractAbstractXmlRequestProcessorFactoryFactoryInstantiatorFactory();
}
public void LongBlock() {
  Factory f = new MassivelyVerboseAbstractAbstractXmlRequestProcessorFactoryFactoryInstantiatorFactory();
}
public void LongBlock() {
  Factory f = new MassivelyVerboseAbstractAbstractXmlRequestProcessorFactoryFactoryInstantiatorFactory();
}

Code block that's a little more problematic.

public void Undo(int levels)
{
  Console.WriteLine("\n---- Undo {0} levels ", levels);
  // Perform undo operations
  for (int i = 0; i < levels; i++)
  {
    if (current > 0)
    {
      Command command = commands[--current] as Command;
      command.UnExecute();
    }
  }
}

This line comes after the code.

Trackbacks (none)

TrackBack URL: http://distilledb.com/mt/mt-tb.cgi/5

leave new comment