Changeset b5e68c8 in mainline for uspace/app/tester/print/print5.c


Ignore:
Timestamp:
2011-05-12T16:49:44Z (14 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f36787d7
Parents:
e80329d6 (diff), 750636a (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes.

File:
1 moved

Legend:

Unmodified
Added
Removed
  • uspace/app/tester/print/print5.c

    re80329d6 rb5e68c8  
    11/*
    2  * Copyright (c) 2007 Jan Hudecek
    3  * Copyright (c) 2008 Martin Decky
     2 * Copyright (c) 2005 Josef Cejka
    43 * All rights reserved.
    54 *
     
    2827 */
    2928
    30 /** @addtogroup genericproc
    31  * @{
     29/*
     30 * This test tests several features of the HelenOS
     31 * printf() implementation which go beyond the POSIX
     32 * specification and GNU printf() behaviour.
     33 *
     34 * Therefore we disable printf() argument checking by
     35 * the GCC compiler in this source file to avoid false
     36 * positives.
     37 *
    3238 */
    33 /** @file tasklet.h
    34  * @brief Tasklets declarations
    35  */
     39#define NVERIFY_PRINTF
    3640
    37 #ifndef KERN_TASKLET_H_
    38 #define KERN_TASKLET_H_
     41#include <stdio.h>
     42#include <unistd.h>
     43#include "../tester.h"
    3944
    40 #include <adt/list.h>
    41 
    42 /** Tasklet callback type */
    43 typedef void (* tasklet_callback_t)(void *arg);
    44 
    45 /** Tasklet state */
    46 typedef enum {
    47         NotActive,
    48         Scheduled,
    49         InProgress,
    50         Disabled
    51 } tasklet_state_t;
    52 
    53 /** Structure describing a tasklet */
    54 typedef struct tasklet_descriptor {
    55         link_t link;
     45const char *test_print5(void)
     46{
     47        TPRINTF("Testing printf(\"%%s\", NULL):\n");
     48        TPRINTF("Expected output: \"(NULL)\"\n");
     49        TPRINTF("Real output:     \"%s\"\n\n", (char *) NULL);
    5650       
    57         /** Callback to call */
    58         tasklet_callback_t callback;
     51        TPRINTF("Testing printf(\"%%c %%3.2c %%-3.2c %%2.3c %%-2.3c\", 'a', 'b', 'c', 'd', 'e'):\n");
     52        TPRINTF("Expected output: [a] [  b] [c  ] [ d] [e ]\n");
     53        TPRINTF("Real output:     [%c] [%3.2c] [%-3.2c] [%2.3c] [%-2.3c]\n\n", 'a', 'b', 'c', 'd', 'e');
    5954       
    60         /** Argument passed to the callback */
    61         void *arg;
    62        
    63         /** State of the tasklet */
    64         tasklet_state_t state;
    65 } tasklet_descriptor_t;
    66 
    67 
    68 extern void tasklet_init(void);
    69 
    70 #endif
    71 
    72 /** @}
    73  */
     55        return NULL;
     56}
Note: See TracChangeset for help on using the changeset viewer.