<commit_before>/**
 * \file compiler_mem_allo.c
 *
 * \date 10.03.2010
 * \author <NAME>
 */

#include <express_tests.h>

DECLARE_EXPRESS_TEST(compiler_mem_alloc, compiler_mem_alloc_test, NULL);


static int compiler_mem_alloc_test(int argc, char** argv) {

    char buf[2];
    static char* proposals[64];
    proposals[0] = "a";        /* for mem allocation only */
    static char space = ' ';
/*    static char space1 = ' '; */ /* with this line works correctly */
    buf[0] = space;
    buf[1] = '\0';
/*    printf("%s\n", buf); */

	if (!strcmp(buf, " ")) {
		return EXPRESS_TESTS_PASSED_RETCODE;
	} else {
		return EXPRESS_TESTS_FAILED_RETCODE;
	}
}<commit_msg>Comments<commit_after>/**
 * @file
 *
 * @brief test for allocation static variables
 *
 * @details At first array of char's allocates.
 * 			Then we write " " to the string.
 * 			At last we check value recorded to the string.
 *
 * 			This problem has not relevant to string,
 * 			possible it connected with memory allocation.
 *
 * @date 10.03.2010
 * @author <NAME>
 */

#include <types.h>
#include <express_tests.h>
DECLARE_EXPRESS_TEST(compiler_mem_alloc, compiler_mem_alloc_test, NULL);

static int compiler_mem_alloc_test(int argc, char** argv) {
	char buf[2];
	static char* proposals[64];
	proposals[0] = "a"; 					/* for mem allocation only */
	static char space = ' ';
/*	static char space1 = ' ';	*/		/* with this line works correctly */
	buf[0] = space;
	buf[1] = '\0';
/*	printf("%s\n", buf); 		*/

	if (!strcmp(buf, " ")) {
		return EXPRESS_TESTS_PASSED_RETCODE;
	} else {
		return EXPRESS_TESTS_FAILED_RETCODE;
	}
}
{'fraction_non_alphanumeric': 0.146158650843223, 'fraction_numerical': 0.019987507807620236, 'mean_word_length': 3.425414364640884, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5996562', 'n_tokens_mistral': 602, 'n_tokens_neox': 570, 'n_words': 148}