Ignore:
Timestamp:
Jul 7, 2010, 6:00:11 AM (12 years ago)
Author:
Peter Johansson
Message:

added line in config file describing config used to create cache (refs
#433). If config is different from the current one, the cache is
ignored and stats are retrieved from repo. Restructured code a bit to
allow loading old cache files; the first line (in cache) is used to
decide which function to use for the loading. Cache files VERSION 7
and newer are supported and older are ignored (refs #289).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/cache_partial_test.cc

    r1119 r1122  
    2424#include "Suite.h"
    2525
     26#include "lib/ClassicStats.h"
    2627#include "lib/File.h"
    2728#include "lib/SVN.h"
     
    6263  suite.add(equal(stats1, stats2, suite));
    6364
     65  // test that load of partial cache is successful
     66  copy_file(test::src_filename("data/AUTHORS.svndigest-cache-r61"), cache_file);
     67  ClassicStats cstats(filename);
     68  std::ifstream is(cache_file.c_str());
     69  svn_revnum_t rev = cstats.load_cache(is);
     70  if (rev!=48) {
     71    suite.out() << "load cache: " << cache_file << " returned " << rev << "\n"
     72                << " expected 48\n";
     73    suite.add(false);
     74  }
     75  is.close();
     76
    6477  if (suite.ok()) {
    6578    suite.out() << "Test is OK\n";
Note: See TracChangeset for help on using the changeset viewer.