Merge pull request #2309 from mitza-oci/warnings
[ACE_TAO.git] / ACE / ACEXML / tests / HttpCharStream_Test.cpp
bloba7d7d7fad3db77617890068da8a8f7b21cd4b916
1 #include "ACEXML/common/HttpCharStream.h"
2 #include "ace/OS_NS_stdio.h"
3 #include "ace/OS_main.h"
5 int ACE_TMAIN (int, ACE_TCHAR *[])
7 const ACEXML_Char* test = ACE_TEXT("http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd");
9 const ACEXML_Char* simple = ACE_TEXT("http://www.w3.org/TR/xhtml1/DTD/xhtml-lat1.ent");
11 ACEXML_HttpCharStream first;
12 ACEXML_HttpCharStream second;
13 ACEXML_Char ch;
15 if (first.open (test) != -1)
17 while (first.get (ch) != -1)
18 ACE_OS::printf ("%c", ch);
20 else
22 first.close();
23 ACE_ERROR ((LM_ERROR, "Error in opening stream : %m\n"));
25 if (second.open (simple) != -1)
27 while (second.get (ch) != -1)
28 ACE_OS::printf ("%c", ch);
30 else
32 second.close();
33 ACE_ERROR ((LM_ERROR, "Error in opening stream : %m\n"));
35 first.close();
36 second.close();
37 return 0;