Skip to content

Commit

Permalink
Merge 0789a1e into f081115
Browse files Browse the repository at this point in the history
  • Loading branch information
luc-tielen committed Mar 20, 2019
2 parents f081115 + 0789a1e commit 4d8cd08
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ endif


install:
luarocks make rockspecs/lua-quickcheck-0.2-2.rockspec
luarocks make rockspecs/lua-quickcheck-0.2-4.rockspec

fixtures:
$(MAKE) -C spec/fixtures build
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
package = 'lua-quickcheck'
version = '0.2-3'
version = '0.2-4'
source = {
url = 'git://github.com/Primordus/lua-quickcheck',
tag = 'v0.2-3'
tag = 'v0.2-4'
}
description = {
summary = 'Property based testing library for Lua',
detailed = [[
QuickCheck is a way to do property based testing using randomly generated input.
Lua-QuickCheck comes with the ability to randomly generate and shrink integers,
doubles, booleans, strings, tables, custom datatypes, ...
All QuickCheck needs is a property function -- it will then randomly generate
inputs to that function and call the property for each set of inputs. If the
property fails (whether by an error or not satisfying your property),
QuickCheck is a way to do property based testing using randomly generated input.
Lua-QuickCheck comes with the ability to randomly generate and shrink integers,
doubles, booleans, strings, tables, custom datatypes, ...
All QuickCheck needs is a property function -- it will then randomly generate
inputs to that function and call the property for each set of inputs. If the
property fails (whether by an error or not satisfying your property),
the inputs are "shrunk" to find a smaller counter-example.
]],
homepage = 'https://github.com/Primordus/lua-quickcheck',
Expand All @@ -34,8 +34,8 @@ build = {
['lqc.generators.float'] = 'lqc/generators/float.lua',
['lqc.generators.any'] = 'lqc/generators/any.lua',
['lqc.generators.int'] = 'lqc/generators/int.lua',
['lqc.generators.str'] = 'lqc/generators/string.lua',
['lqc.generators.tbl'] = 'lqc/generators/table.lua',
['lqc.generators.string'] = 'lqc/generators/string.lua',
['lqc.generators.table'] = 'lqc/generators/table.lua',
['lqc.generator'] = 'lqc/generator.lua',
['lqc.random'] = 'lqc/random.lua',
['lqc.helpers.deep_equals'] = 'lqc/helpers/deep_equals.lua',
Expand Down
7 changes: 4 additions & 3 deletions spec/fixtures/fixtures.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@

#include <stdlib.h>
#include <stdint.h>
#include <stdbool.h>
#include <stddef.h>
Expand Down Expand Up @@ -71,7 +72,7 @@ struct point
bool point_add(struct point* a, struct point* b, struct point* c_out)
{
if (!a || !b || !c_out) { return false; }
c_out->x = a->x + b->x;
c_out->x = a->x + b->x;
c_out->y = a->y + b->y;
return true;
}
Expand All @@ -84,11 +85,11 @@ bool point_add(struct point* a, struct point* b, struct point* c_out)
const char* str_add(const char* const a, const char* const b)
{
if (!a || !b) { return NULL; }

size_t len_a = strlen(a);
size_t len_b = strlen(b);
char* result = (char*) malloc(sizeof(char) * (len_a + len_b + 1));

if (!result) { return NULL; }

memcpy(result, a, len_a);
Expand Down

0 comments on commit 4d8cd08

Please sign in to comment.