Changeset 4058


Ignore:
Timestamp:
Apr 20, 2021, 4:27:18 AM (6 months ago)
Author:
Peter
Message:

a not-so-random number generator that can be used to fill containers in a predictable way

Location:
trunk/test
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/Suite.cc

    r3999 r4058  
    101101
    102102
     103  Generator::Generator(void)
     104    : k_(0)
     105  {}
     106
     107
     108  double Generator::operator()(void)
     109  {
     110    ++k_;
     111    return sin(k_);
     112  }
     113
     114
    103115  std::string filename(const std::string& path)
    104116  {
  • trunk/test/Suite.h

    r3987 r4058  
    188188    unsigned int known_issues_;
    189189    bool ok_;
     190  };
     191
     192
     193  struct Generator
     194  {
     195    Generator(void);
     196    double operator()(void);
     197  private:
     198    size_t k_;
    190199  };
    191200
Note: See TracChangeset for help on using the changeset viewer.