#ifndef TEST_H
#define TEST_H

#include <stdio.h>
#include "../../pnheaders/pns.h"
#include "../../pnheaders/matrix.h"
#include "../matrixmath.h"
#include "../spnbox.h"
#include "../MemoryManager.h"
#include "StructuredIO.h"

/*This file defines some functions that are commonly used in testing spnbox
functions, and includes the things commonly included.*/

/*A way to set the verbosity level. is_verbose, declared in pns, is implemented
in test.c*/
void setverbose(int vrb);

/*If the command line argument is the word "help", show the program help. If
the argument is a filename, open it for read and return a pointer. If there is
no command line argument return a pointer to stdin.*/
FILE* ParseCmdLine(int argc, char* argv[]);

/*Determine if the given i/o matrices have self-loops.*/
int HasSelfLoops(matrix* Dm, matrix* Dp);

/*If D was filled, fill Dm and Dp as appropriate.*/
void FillDmDp(int* Filled, matrix* D, matrix* Dm, matrix* Dp, MemoryManager* mem);

#endif
