aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Tests/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGeneratorTest.cs205
1 files changed, 102 insertions, 103 deletions
diff --git a/OpenSim/Tests/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGeneratorTest.cs b/OpenSim/Tests/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGeneratorTest.cs
index ab8f472..10dd3fe 100644
--- a/OpenSim/Tests/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGeneratorTest.cs
+++ b/OpenSim/Tests/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGeneratorTest.cs
@@ -37,7 +37,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools.Tests
37 /// Each test has some LSL code as input and C# code as expected output. 37 /// Each test has some LSL code as input and C# code as expected output.
38 /// The generated C# code is compared against the expected C# code. 38 /// The generated C# code is compared against the expected C# code.
39 /// </summary> 39 /// </summary>
40 //(TestFixture) 40 [TestFixture]
41 public class CSCodeGeneratorTest 41 public class CSCodeGeneratorTest
42 { 42 {
43 [Test] 43 [Test]
@@ -827,56 +827,56 @@ default
827 string expected = @" 827 string expected = @"
828 public void default_event_touch_start(LSL_Types.LSLInteger num_detected) 828 public void default_event_touch_start(LSL_Types.LSLInteger num_detected)
829 { 829 {
830 LSL_Types.LSLInteger x = 1; 830 LSL_Types.LSLInteger x = new LSL_Types.LSLInteger(1);
831 LSL_Types.LSLInteger y = 0; 831 LSL_Types.LSLInteger y = new LSL_Types.LSLInteger(0);
832 if (x && y) 832 if (x && y)
833 llSay(0, ""Hello""); 833 llSay(new LSL_Types.LSLInteger(0), new LSL_Types.LSLString(""Hello""));
834 if (x || y) 834 if (x || y)
835 { 835 {
836 llSay(0, ""Hi""); 836 llSay(new LSL_Types.LSLInteger(0), new LSL_Types.LSLString(""Hi""));
837 LSL_Types.LSLInteger r = 3; 837 LSL_Types.LSLInteger r = new LSL_Types.LSLInteger(3);
838 return ; 838 return ;
839 } 839 }
840 if (x && y || z) 840 if (x && y || z)
841 llSay(0, ""x is true""); 841 llSay(new LSL_Types.LSLInteger(0), new LSL_Types.LSLString(""x is true""));
842 else 842 else
843 llSay(0, ""x is false""); 843 llSay(new LSL_Types.LSLInteger(0), new LSL_Types.LSLString(""x is false""));
844 if (x == y) 844 if (x == y)
845 llSay(0, ""x is true""); 845 llSay(new LSL_Types.LSLInteger(0), new LSL_Types.LSLString(""x is true""));
846 else 846 else
847 if (y < x) 847 if (y < x)
848 llSay(0, ""y is true""); 848 llSay(new LSL_Types.LSLInteger(0), new LSL_Types.LSLString(""y is true""));
849 else 849 else
850 llSay(0, ""Who needs x and y anyway?""); 850 llSay(new LSL_Types.LSLInteger(0), new LSL_Types.LSLString(""Who needs x and y anyway?""));
851 if (x > y) 851 if (x > y)
852 llSay(0, ""x is true""); 852 llSay(new LSL_Types.LSLInteger(0), new LSL_Types.LSLString(""x is true""));
853 else 853 else
854 if (y <= x) 854 if (y <= x)
855 { 855 {
856 llSay(0, ""uh-oh, y is true, exiting""); 856 llSay(new LSL_Types.LSLInteger(0), new LSL_Types.LSLString(""uh-oh, y is true, exiting""));
857 return ; 857 return ;
858 } 858 }
859 else 859 else
860 llSay(0, ""Who needs x and y anyway?""); 860 llSay(new LSL_Types.LSLInteger(0), new LSL_Types.LSLString(""Who needs x and y anyway?""));
861 if (x >= y) 861 if (x >= y)
862 llSay(0, ""x is true""); 862 llSay(new LSL_Types.LSLInteger(0), new LSL_Types.LSLString(""x is true""));
863 else 863 else
864 if (y != x) 864 if (y != x)
865 llSay(0, ""y is true""); 865 llSay(new LSL_Types.LSLInteger(0), new LSL_Types.LSLString(""y is true""));
866 else 866 else
867 if (!z) 867 if (!z)
868 llSay(0, ""z is true""); 868 llSay(new LSL_Types.LSLInteger(0), new LSL_Types.LSLString(""z is true""));
869 else 869 else
870 if (!(a && b)) 870 if (!(a && b))
871 llSay(0, ""a is true""); 871 llSay(new LSL_Types.LSLInteger(0), new LSL_Types.LSLString(""a is true""));
872 else 872 else
873 if (b) 873 if (b)
874 llSay(0, ""b is true""); 874 llSay(new LSL_Types.LSLInteger(0), new LSL_Types.LSLString(""b is true""));
875 else 875 else
876 if (v) 876 if (v)
877 llSay(0, ""v is true""); 877 llSay(new LSL_Types.LSLInteger(0), new LSL_Types.LSLString(""v is true""));
878 else 878 else
879 llSay(0, ""Everything is lies!""); 879 llSay(new LSL_Types.LSLInteger(0), new LSL_Types.LSLString(""Everything is lies!""));
880 } 880 }
881"; 881";
882 882
@@ -909,13 +909,13 @@ default
909 string expected = @" 909 string expected = @"
910 public void default_event_touch_start(LSL_Types.LSLInteger num_detected) 910 public void default_event_touch_start(LSL_Types.LSLInteger num_detected)
911 { 911 {
912 LSL_Types.LSLInteger x = 1; 912 LSL_Types.LSLInteger x = new LSL_Types.LSLInteger(1);
913 LSL_Types.LSLInteger y = 0; 913 LSL_Types.LSLInteger y = new LSL_Types.LSLInteger(0);
914 while (x) 914 while (x)
915 llSay(0, ""To infinity, and beyond!""); 915 llSay(new LSL_Types.LSLInteger(0), new LSL_Types.LSLString(""To infinity, and beyond!""));
916 while (0 || (x && 0)) 916 while (new LSL_Types.LSLInteger(0) || (x && new LSL_Types.LSLInteger(0)))
917 { 917 {
918 llSay(0, ""Never say never.""); 918 llSay(new LSL_Types.LSLInteger(0), new LSL_Types.LSLString(""Never say never.""));
919 return ; 919 return ;
920 } 920 }
921 } 921 }
@@ -952,14 +952,14 @@ default
952 string expected = @" 952 string expected = @"
953 public void default_event_touch_start(LSL_Types.LSLInteger num_detected) 953 public void default_event_touch_start(LSL_Types.LSLInteger num_detected)
954 { 954 {
955 LSL_Types.LSLInteger x = 1; 955 LSL_Types.LSLInteger x = new LSL_Types.LSLInteger(1);
956 LSL_Types.LSLInteger y = 0; 956 LSL_Types.LSLInteger y = new LSL_Types.LSLInteger(0);
957 do 957 do
958 llSay(0, ""And we're doing...""); 958 llSay(new LSL_Types.LSLInteger(0), new LSL_Types.LSLString(""And we're doing...""));
959 while (x); 959 while (x);
960 do 960 do
961 { 961 {
962 llSay(0, ""I like it here. I wish we could stay here forever.""); 962 llSay(new LSL_Types.LSLInteger(0), new LSL_Types.LSLString(""I like it here. I wish we could stay here forever.""));
963 y--; 963 y--;
964 } 964 }
965 while (y); 965 while (y);
@@ -997,17 +997,17 @@ default
997 string expected = @" 997 string expected = @"
998 public void default_event_touch_start(LSL_Types.LSLInteger num_detected) 998 public void default_event_touch_start(LSL_Types.LSLInteger num_detected)
999 { 999 {
1000 LSL_Types.LSLInteger x = 1; 1000 LSL_Types.LSLInteger x = new LSL_Types.LSLInteger(1);
1001 LSL_Types.LSLInteger y = 0; 1001 LSL_Types.LSLInteger y = new LSL_Types.LSLInteger(0);
1002 for (x = 10; x >= 0; x--) 1002 for (x = new LSL_Types.LSLInteger(10); x >= new LSL_Types.LSLInteger(0); x--)
1003 { 1003 {
1004 llOwnerSay(""Launch in T minus "" + x); 1004 llOwnerSay(new LSL_Types.LSLString(""Launch in T minus "") + x);
1005 IncreaseRocketPower(); 1005 IncreaseRocketPower();
1006 } 1006 }
1007 for (x = 0, y = 6; y > 0 && x != y; x++, y--) 1007 for (x = new LSL_Types.LSLInteger(0), y = new LSL_Types.LSLInteger(6); y > new LSL_Types.LSLInteger(0) && x != y; x++, y--)
1008 llOwnerSay(""Hi "" + x + "", "" + y); 1008 llOwnerSay(new LSL_Types.LSLString(""Hi "") + x + new LSL_Types.LSLString("", "") + y);
1009 for (x = 0, y = 6; !y; x++, y--) 1009 for (x = new LSL_Types.LSLInteger(0), y = new LSL_Types.LSLInteger(6); !y; x++, y--)
1010 llOwnerSay(""Hi "" + x + "", "" + y); 1010 llOwnerSay(new LSL_Types.LSLString(""Hi "") + x + new LSL_Types.LSLString("", "") + y);
1011 } 1011 }
1012"; 1012";
1013 1013
@@ -1046,21 +1046,21 @@ default
1046 string expected = @" 1046 string expected = @"
1047 public void default_event_touch_start(LSL_Types.LSLInteger num_detected) 1047 public void default_event_touch_start(LSL_Types.LSLInteger num_detected)
1048 { 1048 {
1049 LSL_Types.LSLFloat y = 1.0; 1049 LSL_Types.LSLFloat y = new LSL_Types.LSLFloat(1.0);
1050 y = 1.0E3; 1050 y = new LSL_Types.LSLFloat(1.0E3);
1051 y = 1.0e3; 1051 y = new LSL_Types.LSLFloat(1.0e3);
1052 y = 1.0E+3; 1052 y = new LSL_Types.LSLFloat(1.0E+3);
1053 y = 1.0e+3; 1053 y = new LSL_Types.LSLFloat(1.0e+3);
1054 y = 1.0E-3; 1054 y = new LSL_Types.LSLFloat(1.0E-3);
1055 y = 1.0e-3; 1055 y = new LSL_Types.LSLFloat(1.0e-3);
1056 y = -1.0E3; 1056 y = -new LSL_Types.LSLFloat(1.0E3);
1057 y = -1.0e3; 1057 y = -new LSL_Types.LSLFloat(1.0e3);
1058 y = -1.0E+3; 1058 y = -new LSL_Types.LSLFloat(1.0E+3);
1059 y = -1.0e+3; 1059 y = -new LSL_Types.LSLFloat(1.0e+3);
1060 y = -1.0E-3; 1060 y = -new LSL_Types.LSLFloat(1.0E-3);
1061 y = -1.0e-3; 1061 y = -new LSL_Types.LSLFloat(1.0e-3);
1062 y = 12.0 + -1.0E3 - 1.0e-2; 1062 y = new LSL_Types.LSLFloat(12.0) + -new LSL_Types.LSLFloat(1.0E3) - new LSL_Types.LSLFloat(1.0e-2);
1063 LSL_Types.Vector3 v = new LSL_Types.Vector3(0.0, 0.0, 0.0); 1063 LSL_Types.Vector3 v = new LSL_Types.Vector3(new LSL_Types.LSLFloat(0.0), new LSL_Types.LSLFloat(0.0), new LSL_Types.LSLFloat(0.0));
1064 } 1064 }
1065"; 1065";
1066 1066
@@ -1091,8 +1091,8 @@ default
1091 string expected = @" 1091 string expected = @"
1092 public void default_event_touch_start(LSL_Types.LSLInteger num_detected) 1092 public void default_event_touch_start(LSL_Types.LSLInteger num_detected)
1093 { 1093 {
1094 LSL_Types.LSLInteger x = 2; 1094 LSL_Types.LSLInteger x = new LSL_Types.LSLInteger(2);
1095 LSL_Types.LSLInteger y = 1; 1095 LSL_Types.LSLInteger y = new LSL_Types.LSLInteger(1);
1096 LSL_Types.LSLInteger z = x ^ y; 1096 LSL_Types.LSLInteger z = x ^ y;
1097 x = ~z; 1097 x = ~z;
1098 x = ~(y && z); 1098 x = ~(y && z);
@@ -1133,17 +1133,17 @@ default
1133 string expected = @" 1133 string expected = @"
1134 public void default_event_touch_start(LSL_Types.LSLInteger num_detected) 1134 public void default_event_touch_start(LSL_Types.LSLInteger num_detected)
1135 { 1135 {
1136 LSL_Types.LSLString s = """"; 1136 LSL_Types.LSLString s = new LSL_Types.LSLString("""");
1137 LSL_Types.LSLInteger x = 1; 1137 LSL_Types.LSLInteger x = new LSL_Types.LSLInteger(1);
1138 s = (LSL_Types.LSLString) (x++); 1138 s = (LSL_Types.LSLString) (x++);
1139 s = (LSL_Types.LSLString) (x); 1139 s = (LSL_Types.LSLString) (x);
1140 s = (LSL_Types.LSLString) (new LSL_Types.Vector3(0.0, 0.0, 0.0)); 1140 s = (LSL_Types.LSLString) (new LSL_Types.Vector3(new LSL_Types.LSLFloat(0.0), new LSL_Types.LSLFloat(0.0), new LSL_Types.LSLFloat(0.0)));
1141 s = (LSL_Types.LSLString) (new LSL_Types.Quaternion(1.0, 1.0, 1.0, 1.0)); 1141 s = (LSL_Types.LSLString) (new LSL_Types.Quaternion(new LSL_Types.LSLFloat(1.0), new LSL_Types.LSLFloat(1.0), new LSL_Types.LSLFloat(1.0), new LSL_Types.LSLFloat(1.0)));
1142 s = (LSL_Types.LSLInteger) (""1""); 1142 s = (LSL_Types.LSLInteger) (new LSL_Types.LSLString(""1""));
1143 s = (LSL_Types.LSLString) (llSomethingThatReturnsInteger()); 1143 s = (LSL_Types.LSLString) (llSomethingThatReturnsInteger());
1144 s = (LSL_Types.LSLString) (134); 1144 s = (LSL_Types.LSLString) (new LSL_Types.LSLInteger(134));
1145 s = (LSL_Types.LSLString) (x ^ y | (z && l)) + (LSL_Types.LSLString) (x + y - 13); 1145 s = (LSL_Types.LSLString) (x ^ y | (z && l)) + (LSL_Types.LSLString) (x + y - new LSL_Types.LSLInteger(13));
1146 llOwnerSay(""s is: "" + s); 1146 llOwnerSay(new LSL_Types.LSLString(""s is: "") + s);
1147 } 1147 }
1148"; 1148";
1149 1149
@@ -1178,12 +1178,12 @@ state statetwo
1178 string expected = @" 1178 string expected = @"
1179 public void default_event_touch_start(LSL_Types.LSLInteger num_detected) 1179 public void default_event_touch_start(LSL_Types.LSLInteger num_detected)
1180 { 1180 {
1181 llSay(0, ""Going to state 'statetwo'""); 1181 llSay(new LSL_Types.LSLInteger(0), new LSL_Types.LSLString(""Going to state 'statetwo'""));
1182 state(""statetwo""); 1182 state(""statetwo"");
1183 } 1183 }
1184 public void statetwo_event_state_entry() 1184 public void statetwo_event_state_entry()
1185 { 1185 {
1186 llSay(0, ""Going to the default state""); 1186 llSay(new LSL_Types.LSLInteger(0), new LSL_Types.LSLString(""Going to the default state""));
1187 state(""default""); 1187 state(""default"");
1188 } 1188 }
1189"; 1189";
@@ -1213,11 +1213,11 @@ default
1213 string expected = @" 1213 string expected = @"
1214 public void default_event_touch_start(LSL_Types.LSLInteger num_detected) 1214 public void default_event_touch_start(LSL_Types.LSLInteger num_detected)
1215 { 1215 {
1216 LSL_Types.LSLInteger x = 0x23; 1216 LSL_Types.LSLInteger x = new LSL_Types.LSLInteger(0x23);
1217 LSL_Types.LSLInteger x = 0x2f34B; 1217 LSL_Types.LSLInteger x = new LSL_Types.LSLInteger(0x2f34B);
1218 LSL_Types.LSLInteger x = 0x2F34b; 1218 LSL_Types.LSLInteger x = new LSL_Types.LSLInteger(0x2F34b);
1219 LSL_Types.LSLInteger x = 0x2F34B; 1219 LSL_Types.LSLInteger x = new LSL_Types.LSLInteger(0x2F34B);
1220 LSL_Types.LSLInteger x = 0x2f34b; 1220 LSL_Types.LSLInteger x = new LSL_Types.LSLInteger(0x2f34b);
1221 } 1221 }
1222"; 1222";
1223 1223
@@ -1246,9 +1246,9 @@ default
1246 public void default_event_touch_start(LSL_Types.LSLInteger num_detected) 1246 public void default_event_touch_start(LSL_Types.LSLInteger num_detected)
1247 { 1247 {
1248 goto here; 1248 goto here;
1249 llOwnerSay(""Uh oh, the jump didn't work""); 1249 llOwnerSay(new LSL_Types.LSLString(""Uh oh, the jump didn't work""));
1250 here: 1250 here:
1251 llOwnerSay(""After the jump""); 1251 llOwnerSay(new LSL_Types.LSLString(""After the jump""));
1252 } 1252 }
1253"; 1253";
1254 1254
@@ -1280,19 +1280,19 @@ default
1280 public void default_event_touch_start(LSL_Types.LSLInteger num_detected) 1280 public void default_event_touch_start(LSL_Types.LSLInteger num_detected)
1281 { 1281 {
1282 LSL_Types.LSLInteger i = 0; 1282 LSL_Types.LSLInteger i = 0;
1283 LSL_Types.LSLInteger j = 14; 1283 LSL_Types.LSLInteger j = new LSL_Types.LSLInteger(14);
1284 LSL_Types.LSLFloat f = 0.0; 1284 LSL_Types.LSLFloat f = 0.0;
1285 LSL_Types.LSLFloat g = 14.0; 1285 LSL_Types.LSLFloat g = new LSL_Types.LSLFloat(14.0);
1286 LSL_Types.LSLString s = """"; 1286 LSL_Types.LSLString s = """";
1287 LSL_Types.LSLString t = ""Hi there""; 1287 LSL_Types.LSLString t = new LSL_Types.LSLString(""Hi there"");
1288 LSL_Types.list l = new LSL_Types.list(); 1288 LSL_Types.list l = new LSL_Types.list();
1289 LSL_Types.list m = new LSL_Types.list(1, 2, 3); 1289 LSL_Types.list m = new LSL_Types.list(new LSL_Types.LSLInteger(1), new LSL_Types.LSLInteger(2), new LSL_Types.LSLInteger(3));
1290 LSL_Types.Vector3 v = new LSL_Types.Vector3(0.0, 0.0, 0.0); 1290 LSL_Types.Vector3 v = new LSL_Types.Vector3(0.0, 0.0, 0.0);
1291 LSL_Types.Vector3 w = new LSL_Types.Vector3(1.0, 0.1, 0.5); 1291 LSL_Types.Vector3 w = new LSL_Types.Vector3(new LSL_Types.LSLFloat(1.0), new LSL_Types.LSLFloat(0.1), new LSL_Types.LSLFloat(0.5));
1292 LSL_Types.Quaternion r = new LSL_Types.Quaternion(0.0, 0.0, 0.0, 0.0); 1292 LSL_Types.Quaternion r = new LSL_Types.Quaternion(0.0, 0.0, 0.0, 0.0);
1293 LSL_Types.Quaternion u = new LSL_Types.Quaternion(0.8, 0.7, 0.6, llSomeFunc()); 1293 LSL_Types.Quaternion u = new LSL_Types.Quaternion(new LSL_Types.LSLFloat(0.8), new LSL_Types.LSLFloat(0.7), new LSL_Types.LSLFloat(0.6), llSomeFunc());
1294 LSL_Types.LSLString k = """"; 1294 LSL_Types.LSLString k = """";
1295 LSL_Types.LSLString n = ""ping""; 1295 LSL_Types.LSLString n = new LSL_Types.LSLString(""ping"");
1296 } 1296 }
1297"; 1297";
1298 1298
@@ -1323,9 +1323,9 @@ default
1323 { 1323 {
1324 LSL_Types.LSLInteger x = 0; 1324 LSL_Types.LSLInteger x = 0;
1325 LSL_Types.LSLInteger y = 0; 1325 LSL_Types.LSLInteger y = 0;
1326 x = y = 5; 1326 x = y = new LSL_Types.LSLInteger(5);
1327 x += y -= 5; 1327 x += y -= new LSL_Types.LSLInteger(5);
1328 llOwnerSay(""x is: "" + (LSL_Types.LSLString) (x) + "", y is: "" + (LSL_Types.LSLString) (y)); 1328 llOwnerSay(new LSL_Types.LSLString(""x is: "") + (LSL_Types.LSLString) (x) + new LSL_Types.LSLString("", y is: "") + (LSL_Types.LSLString) (y));
1329 } 1329 }
1330"; 1330";
1331 1331
@@ -1350,7 +1350,7 @@ default
1350 string expected = @" 1350 string expected = @"
1351 public void default_event_state_entry() 1351 public void default_event_state_entry()
1352 { 1352 {
1353 LSL_Types.Vector3 v = new LSL_Types.Vector3(x, y, -0.5); 1353 LSL_Types.Vector3 v = new LSL_Types.Vector3(x, y, -new LSL_Types.LSLFloat(0.5));
1354 } 1354 }
1355"; 1355";
1356 1356
@@ -1381,11 +1381,11 @@ default
1381 public void default_event_state_entry() 1381 public void default_event_state_entry()
1382 { 1382 {
1383 LSL_Types.Vector3 v = llGetPos(); 1383 LSL_Types.Vector3 v = llGetPos();
1384 v.z += 4; 1384 v.z += new LSL_Types.LSLInteger(4);
1385 v.z -= 4; 1385 v.z -= new LSL_Types.LSLInteger(4);
1386 v.z *= 4; 1386 v.z *= new LSL_Types.LSLInteger(4);
1387 v.z /= 4; 1387 v.z /= new LSL_Types.LSLInteger(4);
1388 v.z %= 4; 1388 v.z %= new LSL_Types.LSLInteger(4);
1389 } 1389 }
1390"; 1390";
1391 1391
@@ -1408,7 +1408,7 @@ default
1408 string expected = @" 1408 string expected = @"
1409 public void default_event_state_entry() 1409 public void default_event_state_entry()
1410 { 1410 {
1411 while (1 < 0) 1411 while (new LSL_Types.LSLInteger(1) < new LSL_Types.LSLInteger(0))
1412 ; 1412 ;
1413 } 1413 }
1414"; 1414";
@@ -1435,7 +1435,7 @@ default
1435 { 1435 {
1436 do 1436 do
1437 ; 1437 ;
1438 while (1 < 0); 1438 while (new LSL_Types.LSLInteger(1) < new LSL_Types.LSLInteger(0));
1439 } 1439 }
1440"; 1440";
1441 1441
@@ -1458,7 +1458,7 @@ default
1458 string expected = @" 1458 string expected = @"
1459 public void default_event_state_entry() 1459 public void default_event_state_entry()
1460 { 1460 {
1461 if (1 < 0) 1461 if (new LSL_Types.LSLInteger(1) < new LSL_Types.LSLInteger(0))
1462 ; 1462 ;
1463 } 1463 }
1464"; 1464";
@@ -1483,7 +1483,7 @@ default
1483 string expected = @" 1483 string expected = @"
1484 public void default_event_state_entry() 1484 public void default_event_state_entry()
1485 { 1485 {
1486 if (1 < 0) 1486 if (new LSL_Types.LSLInteger(1) < new LSL_Types.LSLInteger(0))
1487 ; 1487 ;
1488 else 1488 else
1489 ; 1489 ;
@@ -1509,7 +1509,7 @@ default
1509 string expected = @" 1509 string expected = @"
1510 public void default_event_state_entry() 1510 public void default_event_state_entry()
1511 { 1511 {
1512 for (x = 4; 1 < 0; x += 2) 1512 for (x = new LSL_Types.LSLInteger(4); new LSL_Types.LSLInteger(1) < new LSL_Types.LSLInteger(0); x += new LSL_Types.LSLInteger(2))
1513 ; 1513 ;
1514 } 1514 }
1515"; 1515";
@@ -1542,13 +1542,13 @@ default
1542 public void default_event_state_entry() 1542 public void default_event_state_entry()
1543 { 1543 {
1544 LSL_Types.LSLInteger x = 0; 1544 LSL_Types.LSLInteger x = 0;
1545 while (x = 14) 1545 while (x = new LSL_Types.LSLInteger(14))
1546 llOwnerSay(""x is: "" + (LSL_Types.LSLString) (x)); 1546 llOwnerSay(new LSL_Types.LSLString(""x is: "") + (LSL_Types.LSLString) (x));
1547 if (x = 24) 1547 if (x = new LSL_Types.LSLInteger(24))
1548 llOwnerSay(""x is: "" + (LSL_Types.LSLString) (x)); 1548 llOwnerSay(new LSL_Types.LSLString(""x is: "") + (LSL_Types.LSLString) (x));
1549 do 1549 do
1550 llOwnerSay(""x is: "" + (LSL_Types.LSLString) (x)); 1550 llOwnerSay(new LSL_Types.LSLString(""x is: "") + (LSL_Types.LSLString) (x));
1551 while (x = 44); 1551 while (x = new LSL_Types.LSLInteger(44));
1552 } 1552 }
1553"; 1553";
1554 1554
@@ -1572,8 +1572,8 @@ default
1572 string expected = @" 1572 string expected = @"
1573 public void default_event_state_entry() 1573 public void default_event_state_entry()
1574 { 1574 {
1575 LSL_Types.list l = new LSL_Types.list(""hello""); 1575 LSL_Types.list l = new LSL_Types.list(new LSL_Types.LSLString(""hello""));
1576 l = (l = new LSL_Types.list()) + l + ""world""; 1576 l = (l = new LSL_Types.list()) + l + new LSL_Types.LSLString(""world"");
1577 } 1577 }
1578"; 1578";
1579 1579
@@ -1631,8 +1631,7 @@ default
1631 } 1631 }
1632 catch (Tools.CSToolsException e) 1632 catch (Tools.CSToolsException e)
1633 { 1633 {
1634 // The syntax error is on line 6, char 5 (expected ';', found 1634 // The syntax error is on line 5, char 14 (Syntax error)
1635 // '}').
1636 Regex r = new Regex("Line ([0-9]+), char ([0-9]+)"); 1635 Regex r = new Regex("Line ([0-9]+), char ([0-9]+)");
1637 Match m = r.Match(e.Message); 1636 Match m = r.Match(e.Message);
1638 Assert.AreEqual("5", m.Groups[1].Value); 1637 Assert.AreEqual("5", m.Groups[1].Value);