http://llvm.org/bugs/show_bug.cgi?id=9854. Also created an emulated hexfloat literal for use in some of the tests. <sigh> And cleaned up some harmless but irritating warnings in the tests.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@131318 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Howard Hinnant
2011-05-13 21:52:40 +00:00
parent 11a58a68e1
commit 0a111118a6
9 changed files with 461 additions and 426 deletions

View File

@@ -20,6 +20,7 @@
#include <streambuf>
#include <cmath>
#include "iterators.h"
#include "../../../../../hexfloat.h"
typedef std::num_get<char, input_iterator<const char*> > F;
@@ -105,7 +106,7 @@ int main()
ios, err, v);
assert(iter.base() == str+sizeof(str)-1);
assert(err == ios.goodbit);
assert(v == 0x125p-1);
assert(v == hexfloat<double>(0x125, 0, -1));
}
{
const char str[] = "inf";

View File

@@ -20,6 +20,7 @@
#include <streambuf>
#include <cmath>
#include "iterators.h"
#include "../../../../../hexfloat.h"
typedef std::num_get<char, input_iterator<const char*> > F;
@@ -93,7 +94,7 @@ int main()
ios, err, v);
assert(iter.base() == str+sizeof(str)-1);
assert(err == ios.goodbit);
assert(v == 0x125p-1);
assert(v == hexfloat<float>(0x125, 0, -1));
}
{
const char str[] = "inf";

View File

@@ -20,6 +20,7 @@
#include <streambuf>
#include <cmath>
#include "iterators.h"
#include "../../../../../hexfloat.h"
typedef std::num_get<char, input_iterator<const char*> > F;
@@ -93,7 +94,7 @@ int main()
ios, err, v);
assert(iter.base() == str+sizeof(str)-1);
assert(err == ios.goodbit);
assert(v == 0x125p-1);
assert(v == hexfloat<long double>(0x125, 0, -1));
}
{
const char str[] = "inf";