Ignore:
Timestamp:
Feb 6, 2004, 11:06:31 AM (22 years ago)
Author:
bird
Message:

more/fixed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/testcase/weak/weak2-main.c

    • Property cvs2svn:cvs-rev changed from 1.3 to 1.4
    r1190 r1191  
    1111#pragma weak weak_not_defined
    1212
     13extern int weak_defined(void);
     14#pragma weak weak_not_defined
     15
    1316int main()
    1417{
     
    1922    if (i != 1)
    2023    {
    21         printf("foo() returned %d, exepcted 1\n", i);
     24        printf("foo() returned %d, expected 1\n", i);
    2225        cErrors++;
    2326    }
     
    2629    if (i != 1)
    2730    {
    28         printf("foo3() returned %d, exepcted 1\n", i);
     31        printf("foo3() returned %d, expected 1\n", i);
    2932        cErrors++;
    3033    }
     
    3336    if (i != -1)
    3437    {
    35         printf("foo4() returned %d, exepcted -1\n", i);
     38        printf("foo4() returned %d, expected -1\n", i);
    3639        cErrors++;
    3740    }
     
    4043    if (i != 1)
    4144    {
    42         printf("foo5() returned %d, exepcted 1\n", i);
     45        printf("foo5() returned %d, expected 1\n", i);
    4346        cErrors++;
    4447    }
     
    4750    if (i != 12)
    4851    {
    49         printf("foo6() returned %d, exepcted 12\n", i);
     52        printf("foo6() returned %d, expected 12\n", i);
    5053        cErrors++;
    5154    }
     
    5457    if (i != 21)
    5558    {
    56         printf("bar sum is %d exepcted 21\n", i);
     59        printf("bar sum is %d expected 21\n", i);
    5760        cErrors++;
    5861    }
     
    6063    if (weak_not_defined)
    6164    {
    62         printf("weak_not_defined %#p exepcted NULL\n", weak_not_defined);
     65        printf("weak_not_defined %#p expected NULL\n", weak_not_defined);
     66        cErrors++;
     67    }
     68
     69    if (!weak_defined)
     70    {
     71        printf("weak_not_defined %#p expected non-zero\n", weak_defined);
    6372        cErrors++;
    6473    }
Note: See TracChangeset for help on using the changeset viewer.