Add 'test/testing.cpp'
This commit is contained in:
parent
6e7fd053ff
commit
3a2c38a8cb
|
@ -0,0 +1,19 @@
|
|||
// Testing file for EZLib functions
|
||||
#include <iostream>
|
||||
#include "lib/ez.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
int main() {
|
||||
cout << "Hello world from the testing app!\n[next you should see EZLib functions]\n";
|
||||
ezl_hello(1); // Displays hello message from EZLib
|
||||
ezl_ver(1); // Displays version of EZLib
|
||||
cout << "\n"; // Due to the current feature ezl_ver() not being availible,
|
||||
// You have to manually add \n... sorry!
|
||||
cout << "System time: "; // not part of EZLib
|
||||
ezl_time(1); // Displays system time using EZLib
|
||||
// Note: if 1 is added in the parenthesis, it will print a newline \n at the end.
|
||||
// Using 0 or any integer but 1 will result in no newline.
|
||||
ezl_wf("testing.txt", "hello, this was written with ezlib's file writer.\n"); // write to "testing.txt"
|
||||
ezl_rf("testing.txt"); // Reads the file "testing.txt"
|
||||
}
|
Loading…
Reference in New Issue