Debug Windows compiler complaint fixes

http://codereview.appspot.com/6208055/



git-svn-id: http://skia.googlecode.com/svn/trunk@3924 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/tests/DrawBitmapRectTest.cpp b/tests/DrawBitmapRectTest.cpp
index 084bdf2..e11acbc 100644
--- a/tests/DrawBitmapRectTest.cpp
+++ b/tests/DrawBitmapRectTest.cpp
@@ -41,9 +41,13 @@
     SkMatrix matrix;
     
     SkCanvas c(dev);
-    matrix.setAll(-119.34097, -43.436558, 93489.945,
-                  43.436558, -119.34097, 123.98426,
-                  0, 0, 1);
+    matrix.setAll(SkFloatToScalar(-119.34097f), 
+                  SkFloatToScalar(-43.436558f), 
+                  SkFloatToScalar(93489.945f),
+                  SkFloatToScalar(43.436558f), 
+                  SkFloatToScalar(-119.34097f), 
+                  SkFloatToScalar(123.98426f),
+                  0, 0, SK_Scalar1);
     c.concat(matrix);
     
     SkBitmap bm;
@@ -53,9 +57,13 @@
     
     SkShader* s = SkShader::CreateBitmapShader(bm, SkShader::kRepeat_TileMode,
                                                SkShader::kRepeat_TileMode);
-    matrix.setAll(0.0078740157, 0, 249,
-                  0, 0.0078740157, 239,
-                  0, 0, 1);
+    matrix.setAll(SkFloatToScalar(0.0078740157f), 
+                  0, 
+                  SkIntToScalar(249),
+                  0, 
+                  SkFloatToScalar(0.0078740157f), 
+                  SkIntToScalar(239),
+                  0, 0, SK_Scalar1);
     s->setLocalMatrix(matrix);
     
     SkPaint paint;
diff --git a/tests/MathTest.cpp b/tests/MathTest.cpp
index fe162b1..eec9dbe 100644
--- a/tests/MathTest.cpp
+++ b/tests/MathTest.cpp
@@ -418,11 +418,13 @@
 
         // These random values are being treated as 32-bit-patterns, not as
         // ints; calling SkIntToScalar() here produces crashes.
-        p.setLength(rand.nextS(),
-                    rand.nextS(), SK_Scalar1);
+        p.setLength((SkScalar) rand.nextS(),
+                    (SkScalar) rand.nextS(), 
+                    SK_Scalar1);
         check_length(reporter, p, SK_Scalar1);
-        p.setLength(rand.nextS() >> 13,
-                    rand.nextS() >> 13, SK_Scalar1);
+        p.setLength((SkScalar) (rand.nextS() >> 13),
+                    (SkScalar) (rand.nextS() >> 13), 
+                    SK_Scalar1);
         check_length(reporter, p, SK_Scalar1);
     }
 
diff --git a/tests/PDFPrimitivesTest.cpp b/tests/PDFPrimitivesTest.cpp
index d1ed217..000ebea 100644
--- a/tests/PDFPrimitivesTest.cpp
+++ b/tests/PDFPrimitivesTest.cpp
@@ -7,8 +7,6 @@
  */
 
 
-#include <string>
-
 #include "Test.h"
 #include "SkData.h"
 #include "SkFlate.h"
@@ -89,9 +87,9 @@
 
 static void SimpleCheckObjectOutput(skiatest::Reporter* reporter,
                                     SkPDFObject* obj,
-                                    const std::string& expectedResult) {
-    CheckObjectOutput(reporter, obj, expectedResult.c_str(),
-                      expectedResult.length(), true, false);
+                                    const char* expectedResult) {
+    CheckObjectOutput(reporter, obj, expectedResult,
+                      strlen(expectedResult), true, false);
 }
 
 static void TestPDFStream(skiatest::Reporter* reporter) {
diff --git a/tests/ToUnicode.cpp b/tests/ToUnicode.cpp
index c0a945a..99e9ef6 100644
--- a/tests/ToUnicode.cpp
+++ b/tests/ToUnicode.cpp
@@ -7,8 +7,6 @@
  */
 
 
-#include <string>
-
 #include "Test.h"
 #include "SkData.h"
 #include "SkPDFTypes.h"