Added some forgoton deffinitions and changed some definitions
This commit is contained in:
38
README.md
38
README.md
@@ -7,14 +7,14 @@ To init the Pickler Lib first include Pickler.h
|
||||
#include "Pickler.h"
|
||||
```
|
||||
After includeing Pickler next we need to init Pickler. This is vary simple. Just
|
||||
add into your `int main()` `CREATESHELF` This creates a safe place to put your pickle
|
||||
add into your `int main()` `INSTALLSHELF` This creates a safe place to put your pickle
|
||||
jars.
|
||||
```C++
|
||||
#include "Pickler.h"
|
||||
|
||||
int main() {
|
||||
// init the shelf
|
||||
CREATESHELF();
|
||||
INSTALLSHELF();
|
||||
}
|
||||
```
|
||||
Once The shelf is created we can create __Pickle Jars__. To Create a pickle jar
|
||||
@@ -26,7 +26,7 @@ plain text and with no speshial characters and should be treated like a varaible
|
||||
|
||||
int main() {
|
||||
// init the shelf
|
||||
CREATESHELF();
|
||||
INSTALLSHELF();
|
||||
// Creating Pickle Jar
|
||||
CREATEJAR(jar_name);
|
||||
}
|
||||
@@ -38,7 +38,7 @@ Treate this like a lambda expretion. A Pickle should look like this.
|
||||
|
||||
int main() {
|
||||
// init the shelf
|
||||
CREATESHELF();
|
||||
INSTALLSHELF();
|
||||
|
||||
// Creating Pickle Jar
|
||||
CREATEJAR(jar_name);
|
||||
@@ -60,7 +60,7 @@ or was _pickled_. (Faled or Successed). Here is how to use the `ASSERT(message,
|
||||
|
||||
int main() {
|
||||
// init the shelf
|
||||
CREATESHELF();
|
||||
INSTALLSHELF();
|
||||
|
||||
// Creating Pickle Jar
|
||||
CREATEJAR(jar_name);
|
||||
@@ -84,7 +84,7 @@ objects are the same or they are different.
|
||||
|
||||
int main() {
|
||||
// init the shelf
|
||||
CREATESHELF();
|
||||
INSTALLSHELF();
|
||||
|
||||
// Creating Pickle Jar
|
||||
CREATEJAR(jar_name);
|
||||
@@ -101,13 +101,13 @@ int main() {
|
||||
}
|
||||
```
|
||||
Now we need to add pickles to the pickle jar. To add pickles to the pickle jar use
|
||||
`ADDPICKLETOJAR(jar,pickle)` to add a pickle to a pickle jar.
|
||||
`ADDPICKLE(jar,pickle)` to add a pickle to a pickle jar.
|
||||
```C++
|
||||
#include "Pickler.h"
|
||||
|
||||
int main() {
|
||||
// init the shelf
|
||||
CREATESHELF();
|
||||
INSTALLSHELF();
|
||||
|
||||
// Creating Pickle Jar
|
||||
CREATEJAR(jar_name);
|
||||
@@ -123,19 +123,19 @@ int main() {
|
||||
}();
|
||||
|
||||
// Adding pickls to pickle jar
|
||||
ADDPICKLETOJAR(jar_name, pickle_name);
|
||||
ADDPICKLETOJAR(jar_name, pickle_name2);
|
||||
ADDPICKLE(jar_name, pickle_name);
|
||||
ADDPICKLE(jar_name, pickle_name2);
|
||||
}
|
||||
```
|
||||
The pickles have now been added to the pickle jar, but now we need to add the
|
||||
pickle jar to the pickle shelf. To do this just simply add `ADDJARTOSHELF(jar)`.
|
||||
pickle jar to the pickle shelf. To do this just simply add `PUTJARONSHELF(jar)`.
|
||||
This macro will add the pickle jar to the shelf.
|
||||
```C++
|
||||
#include "Pickler.h"
|
||||
|
||||
int main() {
|
||||
// init the shelf
|
||||
CREATESHELF();
|
||||
INSTALLSHELF();
|
||||
|
||||
// Creating Pickle Jar
|
||||
CREATEJAR(jar_name);
|
||||
@@ -151,11 +151,11 @@ int main() {
|
||||
}();
|
||||
|
||||
// Adding pickls to pickle jar
|
||||
ADDPICKLETOJAR(jar_name, pickle_name);
|
||||
ADDPICKLETOJAR(jar_name, pickle_name2);
|
||||
ADDPICKLE(jar_name, pickle_name);
|
||||
ADDPICKLE(jar_name, pickle_name2);
|
||||
|
||||
// Adding pickle jar to pickle shelf.
|
||||
ADDJARTOSHELF(jar_name);
|
||||
PUTJARONSHELF(jar_name);
|
||||
}
|
||||
```
|
||||
Now The last step to use Pickler. For the return of main just return `PICKLESHELF`.
|
||||
@@ -165,7 +165,7 @@ Thats it.
|
||||
|
||||
int main() {
|
||||
// init the shelf
|
||||
CREATESHELF();
|
||||
INSTALLSHELF();
|
||||
|
||||
// Creating Pickle Jar
|
||||
CREATEJAR(jar_name);
|
||||
@@ -181,11 +181,11 @@ int main() {
|
||||
}();
|
||||
|
||||
// Adding pickls to pickle jar
|
||||
ADDPICKLETOJAR(jar_name, pickle_name);
|
||||
ADDPICKLETOJAR(jar_name, pickle_name2);
|
||||
ADDPICKLE(jar_name, pickle_name);
|
||||
ADDPICKLE(jar_name, pickle_name2);
|
||||
|
||||
// Adding pickle jar to pickle shelf.
|
||||
ADDJARTOSHELF(jar_name);
|
||||
PUTJARONSHELF(jar_name);
|
||||
|
||||
return PICKLESHELF;
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ struct pickle_jar {
|
||||
int functionCount;
|
||||
bool passed;
|
||||
} ;
|
||||
///
|
||||
|
||||
struct pickle_shelf {
|
||||
struct pickle_jar* pickle_jars;
|
||||
int pickle_jarCount = 0;
|
||||
@@ -71,4 +71,5 @@ int __pickle_shelf_run(pickle_shelf*);
|
||||
#define PICKLE(name) struct pickle name = []() -> pickle
|
||||
#define ADDPICKLE(jar,pickle) __pickle_add_jar(&jar, pickle, #pickle)
|
||||
#define PUTJARONSHLEF(jar) __pickle_jar_add_to_shelf(&__pickle_shelf__,jar);
|
||||
#define PICKLESHELF __pickle_shelf_run(&__pickle_shelf__)
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user