[llvm-commits] [llvm] r146733 - /llvm/trunk/unittests/ADT/VariadicFunctionTest.cpp
Chandler Carruth
chandlerc at gmail.com
Fri Dec 16 01:37:55 PST 2011
Author: chandlerc
Date: Fri Dec 16 03:37:55 2011
New Revision: 146733
URL: http://llvm.org/viewvc/llvm-project?rev=146733&view=rev
Log:
Put the '*' in the right place in the unit test. Forgot to fix up this
bit of style, sorry.
Modified:
llvm/trunk/unittests/ADT/VariadicFunctionTest.cpp
Modified: llvm/trunk/unittests/ADT/VariadicFunctionTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ADT/VariadicFunctionTest.cpp?rev=146733&r1=146732&r2=146733&view=diff
==============================================================================
--- llvm/trunk/unittests/ADT/VariadicFunctionTest.cpp (original)
+++ llvm/trunk/unittests/ADT/VariadicFunctionTest.cpp Fri Dec 16 03:37:55 2011
@@ -16,7 +16,7 @@
// Defines a variadic function StringCat() to join strings.
// StringCat()'s arguments and return value have class types.
-std::string StringCatImpl(ArrayRef<const std::string*> Args) {
+std::string StringCatImpl(ArrayRef<const std::string *> Args) {
std::string S;
for (unsigned i = 0, e = Args.size(); i < e; ++i)
S += *Args[i];
@@ -39,7 +39,7 @@
// have primitive types.
// The return type of SumImp() is deliberately different from its
// argument type, as we want to test that this works.
-long SumImpl(ArrayRef<const int*> Args) {
+long SumImpl(ArrayRef<const int *> Args) {
long Result = 0;
for (unsigned i = 0, e = Args.size(); i < e; ++i)
Result += *Args[i];
@@ -56,7 +56,7 @@
// Appends an array of strings to dest and returns the number of
// characters appended.
-int StringAppendImpl(std::string* Dest, ArrayRef<const std::string*> Args) {
+int StringAppendImpl(std::string *Dest, ArrayRef<const std::string *> Args) {
int Chars = 0;
for (unsigned i = 0, e = Args.size(); i < e; ++i) {
Chars += Args[i]->size();
@@ -64,7 +64,7 @@
}
return Chars;
}
-const VariadicFunction1<int, std::string*, std::string,
+const VariadicFunction1<int, std::string *, std::string,
StringAppendImpl> StringAppend;
TEST(VariadicFunction1Test, Works) {
@@ -85,14 +85,14 @@
// Counts how many optional arguments fall in the given range.
// Returns the result in *num_in_range. We make the return type void
// as we want to test that VariadicFunction* can handle it.
-void CountInRangeImpl(int* NumInRange, int Low, int High,
- ArrayRef<const int*> Args) {
+void CountInRangeImpl(int *NumInRange, int Low, int High,
+ ArrayRef<const int *> Args) {
*NumInRange = 0;
for (unsigned i = 0, e = Args.size(); i < e; ++i)
if (Low <= *Args[i] && *Args[i] <= High)
++(*NumInRange);
}
-const VariadicFunction3<void, int*, int, int, int,
+const VariadicFunction3<void, int *, int, int, int,
CountInRangeImpl> CountInRange;
TEST(VariadicFunction3Test, Works) {
More information about the llvm-commits
mailing list