Add 'test/testing.cpp'

This commit is contained in:
latenightz 2021-04-26 19:24:09 +00:00
parent 6e7fd053ff
commit 3a2c38a8cb
1 changed files with 19 additions and 0 deletions

19
test/testing.cpp Normal file
View File

@ -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"
}