mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-30 16:24:09 +03:00
PdePreprocessor.scubComments result used before looking for libraries. Fixes #1293
This commit is contained in:
@ -0,0 +1,15 @@
|
||||
#include <CapacitiveSensorDue.h>
|
||||
/*
|
||||
#include <WiFi.h>
|
||||
*/
|
||||
CapacitiveSensorDue cs_13_8 = CapacitiveSensorDue(13,8);
|
||||
void setup()
|
||||
{
|
||||
Serial.begin(9600);
|
||||
}
|
||||
void loop()
|
||||
{
|
||||
long total1 = cs_13_8.read(30);
|
||||
Serial.println(total1);
|
||||
delay(100);
|
||||
}
|
@ -18,4 +18,14 @@ public class PdePreprocessorTest {
|
||||
|
||||
assertEquals(actualOutput, expectedOutput);
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testIncludeInsideMultilineComment() throws Exception {
|
||||
String s = FileUtils.readFileToString(new File(PdePreprocessorTest.class.getResource("IncludeBetweenMultilineComment.ino").getFile()));
|
||||
|
||||
PdePreprocessor pdePreprocessor = new PdePreprocessor();
|
||||
pdePreprocessor.writePrefix(s);
|
||||
assertEquals(1, pdePreprocessor.getExtraImports().size());
|
||||
assertEquals("CapacitiveSensorDue.h", pdePreprocessor.getExtraImports().get(0));
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user