Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(100)

Side by Side Diff: Source/wtf/tests/IntegerToStringConversion.cpp

Issue 23672027: Rename OS(WINDOWS) to OS(WIN) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/wtf/ThreadingWin.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2012 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 27 matching lines...) Expand all
38 template<> struct PrintfFormatTrait<short> { static const char format[]; }; 38 template<> struct PrintfFormatTrait<short> { static const char format[]; };
39 const char PrintfFormatTrait<short>::format[] = "%hd"; 39 const char PrintfFormatTrait<short>::format[] = "%hd";
40 40
41 template<> struct PrintfFormatTrait<int> { static const char format[]; }; 41 template<> struct PrintfFormatTrait<int> { static const char format[]; };
42 const char PrintfFormatTrait<int>::format[] = "%d"; 42 const char PrintfFormatTrait<int>::format[] = "%d";
43 43
44 template<> struct PrintfFormatTrait<long> { static const char format[]; }; 44 template<> struct PrintfFormatTrait<long> { static const char format[]; };
45 const char PrintfFormatTrait<long>::format[] = "%ld"; 45 const char PrintfFormatTrait<long>::format[] = "%ld";
46 46
47 template<> struct PrintfFormatTrait<long long> { static const char format[]; }; 47 template<> struct PrintfFormatTrait<long long> { static const char format[]; };
48 #if OS(WINDOWS) 48 #if OS(WIN)
49 const char PrintfFormatTrait<long long>::format[] = "%I64i"; 49 const char PrintfFormatTrait<long long>::format[] = "%I64i";
50 #else 50 #else
51 const char PrintfFormatTrait<long long>::format[] = "%lli"; 51 const char PrintfFormatTrait<long long>::format[] = "%lli";
52 #endif // OS(WINDOWS) 52 #endif // OS(WIN)
53 53
54 template<> struct PrintfFormatTrait<unsigned short> { static const char format[] ; }; 54 template<> struct PrintfFormatTrait<unsigned short> { static const char format[] ; };
55 const char PrintfFormatTrait<unsigned short>::format[] = "%hu"; 55 const char PrintfFormatTrait<unsigned short>::format[] = "%hu";
56 56
57 template<> struct PrintfFormatTrait<unsigned> { static const char format[]; }; 57 template<> struct PrintfFormatTrait<unsigned> { static const char format[]; };
58 const char PrintfFormatTrait<unsigned>::format[] = "%u"; 58 const char PrintfFormatTrait<unsigned>::format[] = "%u";
59 59
60 template<> struct PrintfFormatTrait<unsigned long> { static const char format[]; }; 60 template<> struct PrintfFormatTrait<unsigned long> { static const char format[]; };
61 const char PrintfFormatTrait<unsigned long>::format[] = "%lu"; 61 const char PrintfFormatTrait<unsigned long>::format[] = "%lu";
62 62
63 template<> struct PrintfFormatTrait<unsigned long long> { static const char form at[]; }; 63 template<> struct PrintfFormatTrait<unsigned long long> { static const char form at[]; };
64 #if OS(WINDOWS) 64 #if OS(WIN)
65 const char PrintfFormatTrait<unsigned long long>::format[] = "%I64u"; 65 const char PrintfFormatTrait<unsigned long long>::format[] = "%I64u";
66 #else 66 #else
67 const char PrintfFormatTrait<unsigned long long>::format[] = "%llu"; 67 const char PrintfFormatTrait<unsigned long long>::format[] = "%llu";
68 #endif // OS(WINDOWS) 68 #endif // OS(WIN)
69 69
70 70
71 // FIXME: use snprintf from StringExtras.h 71 // FIXME: use snprintf from StringExtras.h
72 template<typename IntegerType> 72 template<typename IntegerType>
73 void testBoundaries() 73 void testBoundaries()
74 { 74 {
75 const unsigned bufferSize = 256; 75 const unsigned bufferSize = 256;
76 Vector<char, bufferSize> buffer; 76 Vector<char, bufferSize> buffer;
77 buffer.resize(bufferSize); 77 buffer.resize(bufferSize);
78 78
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 128
129 TEST(WTF, IntegerToStringConversionUnsignedIntegerRegularNumbers) 129 TEST(WTF, IntegerToStringConversionUnsignedIntegerRegularNumbers)
130 { 130 {
131 testNumbers<unsigned short>(); 131 testNumbers<unsigned short>();
132 testNumbers<unsigned int>(); 132 testNumbers<unsigned int>();
133 testNumbers<unsigned long>(); 133 testNumbers<unsigned long>();
134 testNumbers<unsigned long long>(); 134 testNumbers<unsigned long long>();
135 } 135 }
136 136
137 } // namespace 137 } // namespace
OLDNEW
« no previous file with comments | « Source/wtf/ThreadingWin.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698