/* ====================================================================
 * Copyright (c) 2003-2007, Martin Hauner
 *                          http://subcommander.tigris.org
 *
 * Subcommander is licensed as described in the file doc/COPYING, which
 * you should have received as part of this distribution.
 * ====================================================================
 */

#include "DiffTest.h"

#include <cppunit/TestSuite.h>
#include <cppunit/TestCaller.h>

#include "svn/Diff.h"


void DiffTest::setUp()
{
}

void DiffTest::tearDown()
{
}

void DiffTest::testMe()
{
  // not a very useful test...

  class Baton : public svn::DiffBaton
  {
  public:
    sc::Error* open( svn::Diff::DataSource source )
    {
      return 0;
    }

    sc::Error* close( svn::Diff::DataSource source )
    {
      return 0;
    }

    sc::Error* getNextToken( svn::DiffToken** token, svn::Diff::DataSource source )
    {
      *token = 0;
      return 0;
    }

    int compareToken( svn::DiffToken* ltoken, svn::DiffToken* rtoken )
    {
      return 0;
    }

    void discardToken( svn::DiffToken* token )
    {
    }

    void discardAllToken()
    {
    }
  };

  svn::Diff      diff(0);
  svn::DiffData *diffData = NULL;
  Baton          baton;

  sc::Error* err = diff.diff( &diffData, &baton );

  CPPUNIT_ASSERT(err==0);
}
