diff options
author | Rob Savoye | 2010-11-26 15:59:58 -0700 |
---|---|---|
committer | Rob Savoye | 2010-11-26 15:59:58 -0700 |
commit | 8779a5b0862d0549b6543f3f1383a6ca3b47432b (patch) | |
tree | 2d20423d256d26328acf6391c06d7a306e62da75 /gr-run-waveform | |
parent | c2a537525d6a36d025a597003c2112133cce0394 (diff) | |
download | gnuradio-8779a5b0862d0549b6543f3f1383a6ca3b47432b.tar.gz gnuradio-8779a5b0862d0549b6543f3f1383a6ca3b47432b.tar.bz2 gnuradio-8779a5b0862d0549b6543f3f1383a6ca3b47432b.zip |
only test C API for now, as it uses the C++ one anyway. Add tests for xyzzy_init() and xyzzy_file_exists()
Diffstat (limited to 'gr-run-waveform')
-rw-r--r-- | gr-run-waveform/test_xyzzy.cc | 29 |
1 files changed, 24 insertions, 5 deletions
diff --git a/gr-run-waveform/test_xyzzy.cc b/gr-run-waveform/test_xyzzy.cc index fd78916ad..425a92626 100644 --- a/gr-run-waveform/test_xyzzy.cc +++ b/gr-run-waveform/test_xyzzy.cc @@ -80,18 +80,37 @@ main(int argc, char *argv[]) cout << "FAILED: XYZZY::read_header()" << endl; } +#if 0 if (xyzzy.init()) { cout << "PASSED: XYZZY::init()" << endl; } else { cout << "FAILED: XYZZY::init()" << endl; } - - +#endif + xyzzy.clear(); + + // Look for a file to exist, which shouldn't as we haven't loaded the data + if (xyzzy_file_exists("srfi/srfi-35.scm")) { + cout << "FAILED: xyzzy_file_exists(not yet)" << endl; + } else { + cout << "PASSED: xyzzy_file_exists(not yet)" << endl; + } + // Initialize with the data file produced by gen-xyzzy. -// xyzzy_init(); -// bool xyzzy_init(const std::string &file) + string fullspec = "/usr/local/share/gnuradio/gr-run-waveform/filesystem.dat"; + if (xyzzy_init(fullspec)) { + cout << "PASSED: xyzzy_init()" << endl; + } else { + cout << "FAILED: xyzzy_init()" << endl; + } + // Does a file with name 'filename' exist in magic filesystem? -// bool xyzzy_file_exists(handle, const std::string &filespec); + if (xyzzy_file_exists("srfi/srfi-35.scm")) { + cout << "PASSED: xyzzy_file_exists()" << endl; + } else { + cout << "FAILED: xyzzy_file_exists()" << endl; + } + // bool file_exists(const std::string &filespec) // Return a C port that will read the file contents |