Skip to content

Commit 335d89a

Browse files
committed
Removed unnecessary comments from code used to functionally test the compiler
1 parent d6e3f88 commit 335d89a

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Symfony/src/Codebender/CompilerBundle/Tests/Controller/DefaultControllerFunctionalTest.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public function testInvalidInput()
5252

5353
public function testBlinkUnoSyntaxCheck()
5454
{
55-
$files = array(array("filename" => "Blink.ino", "content" => "/*\n Blink\n Turns on an LED on for one second, then off for one second, repeatedly.\n \n This example code is in the public domain.\n *///\n \n// Pin 13 has an LED connected on most Arduino boards.\n// give it a name:\nint led = 13;\n\n// the setup routine runs once when you press reset:\nvoid setup() { \n // initialize the digital pin as an output.\n pinMode(led, OUTPUT); \n}\n\n// the loop routine runs over and over again forever:\nvoid loop() {\n digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level)\n delay(1000); // wait for a second\n digitalWrite(led, LOW); // turn the LED off by making the voltage LOW\n delay(1000); // wait for a second\n}\n"));
55+
$files = array(array("filename" => "Blink.ino", "content" => "int led = 13;\nvoid setup() {pinMode(led, OUTPUT);}\nvoid loop() {\ndigitalWrite(led, HIGH);\ndelay(1000);\ndigitalWrite(led, LOW);\ndelay(1000);\n}\n"));
5656
$format = "syntax";
5757
$version = "105";
5858
$libraries = array();
@@ -75,7 +75,7 @@ public function testBlinkUnoSyntaxCheck()
7575

7676
public function testBlinkUnoCompile()
7777
{
78-
$files = array(array("filename" => "Blink.ino", "content" => "/*\n Blink\n Turns on an LED on for one second, then off for one second, repeatedly.\n \n This example code is in the public domain.\n *///\n \n// Pin 13 has an LED connected on most Arduino boards.\n// give it a name:\nint led = 13;\n\n// the setup routine runs once when you press reset:\nvoid setup() { \n // initialize the digital pin as an output.\n pinMode(led, OUTPUT); \n}\n\n// the loop routine runs over and over again forever:\nvoid loop() {\n digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level)\n delay(1000); // wait for a second\n digitalWrite(led, LOW); // turn the LED off by making the voltage LOW\n delay(1000); // wait for a second\n}\n"));
78+
$files = array(array("filename" => "Blink.ino", "content" => "\nint led = 13;\nvoid setup() {\npinMode(led, OUTPUT);\n}\nvoid loop() {\ndigitalWrite(led, HIGH);\ndelay(1000);\ndigitalWrite(led, LOW);\ndelay(1000);\n}\n"));
7979
$format = "binary";
8080
$version = "105";
8181
$libraries = array();
@@ -98,7 +98,7 @@ public function testBlinkUnoCompile()
9898

9999
public function testBlinkUnoSyntaxCheckError()
100100
{
101-
$files = array(array("filename" => "Blink.ino", "content" => "/*\n Blink\n Turns on an LED on for one second, then off for one second, repeatedly.\n \n This example code is in the public domain.\n *///\n \n// Pin 13 has an LED connected on most Arduino boards.\n// give it a name:\nint led = 13\n\n// the setup routine runs once when you press reset:\nvoid setup() { \n // initialize the digital pin as an output.\n pinMode(led, OUTPUT);\n pinMode(led); \n}\n\n// the loop routine runs over and over again forever:\nvoid loop() {\n digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level)\n delay(1000); // wait for a second\n digitalWrite(led, LOW); // turn the LED off by making the voltage LOW\n delay(1000); // wait for a second\n}\n"));
101+
$files = array(array("filename" => "Blink.ino", "content" => "\nint led = 13\nvoid setup() {\npinMode(led, OUTPUT);\npinMode(led);\n}\nvoid loop() {\ndigitalWrite(led, HIGH);\ndelay(1000);\ndigitalWrite(led, LOW);\ndelay(1000);\n}\n"));
102102
$format = "syntax";
103103
$version = "105";
104104
$libraries = array();
@@ -117,7 +117,7 @@ public function testBlinkUnoSyntaxCheckError()
117117
$this->assertEquals($response["success"], false);
118118
$this->assertEquals($response["success"], false);
119119
$this->assertEquals($response["step"], 4);
120-
$this->assertContains("Blink.ino:10:13:", $response["message"]);
120+
$this->assertContains("Blink.ino:2:13:", $response["message"]);
121121
$this->assertContains("expected ';' after top level declarator", $response["message"]);
122122
$this->assertContains("no matching function for call to 'pinMode'", $response["message"]);
123123
$this->assertContains("candidate function not viable: requires 2 arguments, but 1 was provided", $response["message"]);
@@ -126,7 +126,7 @@ public function testBlinkUnoSyntaxCheckError()
126126

127127
public function testBlinkUnoCompileError()
128128
{
129-
$files = array(array("filename" => "Blink.ino", "content" => "/*\n Blink\n Turns on an LED on for one second, then off for one second, repeatedly.\n \n This example code is in the public domain.\n *///\n \n// Pin 13 has an LED connected on most Arduino boards.\n// give it a name:\nint led = 13\n\n// the setup routine runs once when you press reset:\nvoid setup() { \n // initialize the digital pin as an output.\n pinMode(led, OUTPUT);\n pinMode(led); \n}\n\n// the loop routine runs over and over again forever:\nvoid loop() {\n digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level)\n delay(1000); // wait for a second\n digitalWrite(led, LOW); // turn the LED off by making the voltage LOW\n delay(1000); // wait for a second\n}\n"));
129+
$files = array(array("filename" => "Blink.ino", "content" => "\nint led = 13\nvoid setup() {\npinMode(led, OUTPUT);\npinMode(led);\n}\nvoid loop() {\ndigitalWrite(led, HIGH);\ndelay(1000);\ndigitalWrite(led, LOW);\n delay(1000);\n}\n"));
130130
$format = "binary";
131131
$version = "105";
132132
$libraries = array();
@@ -144,7 +144,7 @@ public function testBlinkUnoCompileError()
144144

145145
$this->assertEquals($response["success"], false);
146146
$this->assertEquals($response["step"], 4);
147-
$this->assertContains("Blink.ino:10:13:", $response["message"]);
147+
$this->assertContains("Blink.ino:2:13:", $response["message"]);
148148
$this->assertContains("expected ';' after top level declarator", $response["message"]);
149149
$this->assertContains("no matching function for call to 'pinMode'", $response["message"]);
150150
$this->assertContains("candidate function not viable: requires 2 arguments, but 1 was provided", $response["message"]);

0 commit comments

Comments
 (0)