Skip to content
This repository has been archived by the owner on Jul 23, 2024. It is now read-only.

Commit

Permalink
HAWQ-1617. Fix function calls from unit tests
Browse files Browse the repository at this point in the history
Fix calls to 'pxf_free_expression_items_list' from unit tests (the 2nd parameter is always true)
'enrich_trivial_expression' was renamed to 'add_extra_expression_items'. The necessary changes in tests are made by this commit
  • Loading branch information
Ivan Leskin authored and rlei committed Sep 11, 2018
1 parent 472fa2b commit c6c7988
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/backend/access/external/test/pxffilters_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
Expand Down Expand Up @@ -814,7 +814,7 @@ void test__pxf_serialize_filter_list__oneFilter(void **state)
char* result = pxf_serialize_filter_list(expressionItems);
assert_string_equal(result, "a0c25s4d1984o5");

pxf_free_expression_items_list(expressionItems, true);
pxf_free_expression_items_list(expressionItems);
expressionItems = NIL;
pfree(result);

Expand All @@ -832,7 +832,7 @@ void test__pxf_serialize_fillter_list__nullFilter(void **state)
char* result = pxf_serialize_filter_list(expressionItems);
assert_string_equal(result, "a0o8");

pxf_free_expression_items_list(expressionItems, true);
pxf_free_expression_items_list(expressionItems);
expressionItems = NIL;
pfree(result);

Expand Down Expand Up @@ -866,11 +866,11 @@ test__pxf_serialize_filter_list__manyFilters(void **state)
pfree(result);

int trivialExpressionItems = expressionItems->length;
enrich_trivial_expression(expressionItems);
add_extra_and_expression_items(expressionItems, trivialExpressionItems - 1);

assert_int_equal(expressionItems->length, 2*trivialExpressionItems - 1);
assert_int_equal(expressionItems->length, 2 * trivialExpressionItems - 1);

pxf_free_expression_items_list(expressionItems, true);
pxf_free_expression_items_list(expressionItems);
expressionItems = NIL;
}

Expand Down Expand Up @@ -931,8 +931,8 @@ test__extractPxfAttributes_supported_function_one_arg(void **state) {
}
}

int
main(int argc, char* argv[])
int
main(int argc, char* argv[])
{
cmockery_parse_arguments(argc, argv);

Expand Down

0 comments on commit c6c7988

Please sign in to comment.