<commit_before>/* vi: set ts=4 expandtab shiftwidth=4: */
/**
 * @file
 *
 * Copyright 2015 Digital Aggregates Corporation, Colorado, USA<BR>
 * Licensed under the terms in README.h<BR>
 * <NAME> <<EMAIL>><BR>
 * http://www.diag.com/navigation/downloads/Diminuto.html<BR>
 *
 * Most of the Diminuto fd API is tested in the mux unit test, for which that
 * portion of the fd API was written.
 */

#include "com/diag/diminuto/diminuto_unittest.h"
#include "com/diag/diminuto/diminuto_log.h"
#include "com/diag/diminuto/diminuto_fd.h"
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/socket.h>
#include <fcntl.h>
#include <unistd.h>

#define DIMINUTO_FD_TYPE(_FD_, _EXPECTED_) \
    do { \
        diminuto_fd_type_t type; \
        fprintf(stderr, "unittest-fd: %s=%d type=%d expected=%d\n", #_FD_, _FD_, type = diminuto_fd_type(_FD_), _EXPECTED_); \
        if (_EXPECTED_ >= 0) { EXPECT(type == _EXPECTED_); } \
    } while (0)

int main(void)
{

    SETLOGMASK();
<commit_msg>Changed fprintf to log statement in unit test.<commit_after>/* vi: set ts=4 expandtab shiftwidth=4: */
/**
 * @file
 *
 * Copyright 2015 Digital Aggregates Corporation, Colorado, USA<BR>
 * Licensed under the terms in README.h<BR>
 * <NAME> <<EMAIL>><BR>
 * http://www.diag.com/navigation/downloads/Diminuto.html<BR>
 *
 * Most of the Diminuto fd API is tested in the mux unit test, for which that
 * portion of the fd API was written.
 */

#include "com/diag/diminuto/diminuto_unittest.h"
#include "com/diag/diminuto/diminuto_log.h"
#include "com/diag/diminuto/diminuto_fd.h"
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/socket.h>
#include <fcntl.h>
#include <unistd.h>

#define DIMINUTO_FD_TYPE(_FD_, _EXPECTED_) \
    do { \
        diminuto_fd_type_t type; \
        DIMINUTO_LOG_DEBUG(DIMINUTO_LOG_HERE "%s=%d type=%d expected=%d\n", #_FD_, _FD_, type = diminuto_fd_type(_FD_), _EXPECTED_); \
        if (_EXPECTED_ >= 0) { EXPECT(type == _EXPECTED_); } \
    } while (0)

int main(void)
{

    SETLOGMASK();

{'fraction_non_alphanumeric': 0.15197272284461763, 'fraction_numerical': 0.007793472966390648, 'mean_word_length': 3.878859857482185, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 31, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6243062', 'n_tokens_mistral': 798, 'n_tokens_neox': 798, 'n_words': 186}