Skip to content

Commit a5d4a0e

Browse files
committed
new test added
added an ino which includes an .hpp file. The .hpp defines a var that is used by the ino, in order to insure that the hpp file is correctly fetched by the compiler.
1 parent 77597d6 commit a5d4a0e

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

Diff for: Symfony/src/Codebender/CompilerBundle/Tests/Controller/DefaultControllerFunctionalTest.php

+24
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,30 @@ public function testInvalidInput()
5050

5151
}
5252

53+
public function testSkchHppUnoSyntaxCheck()
54+
{
55+
$files = array(array("filename" => "SkchHpp.ino", "content" => "#include<jsonhp.hpp>\nvoid setup()\n{\nSerial.begin(9600);\n\tint x = vardeb+5;\nSerial.println(x);\n}\n\nvoid loop()\n{\n\n}\n"));
56+
$format = "syntax";
57+
$version = "105";
58+
$libraries = array('jsonlib' => array('files' => array('filename' => 'jsonhp.hpp', 'content' => "#define vardeb 3;\n")));
59+
$build = array("mcu" => "atmega328p", "f_cpu" => "16000000", "core" => "arduino", "variant" => "standard");
60+
61+
$data = json_encode(array("files" => $files, "format" => $format, "version" => $version, "libraries" => $libraries, "build" => $build));
62+
63+
$client = static::createClient();
64+
65+
$authorizationKey = $client->getContainer()->getParameter("authorizationKey");
66+
67+
$client->request('POST', '/' . $authorizationKey . '/v1', array(), array(), array(), $data);
68+
69+
$response = json_decode($client->getResponse()->getContent(), true);
70+
71+
$this->assertEquals($response["success"], true);
72+
$this->assertTrue(is_numeric($response["time"]));
73+
74+
}
75+
76+
5377
public function testBlinkUnoSyntaxCheck()
5478
{
5579
$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"));

0 commit comments

Comments
 (0)