Skip to content

Commit

Permalink
Added dummy library "JSON Library" with examples
Browse files Browse the repository at this point in the history
with this library and examples we will test the .hpp files handling by
eratosthenes and the compiler
  • Loading branch information
st8ingenious committed Jul 28, 2016
1 parent 9d59d9b commit b7536e5
Show file tree
Hide file tree
Showing 11 changed files with 82 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,20 @@ class LoadExternalLibraryData extends AbstractFixture implements OrderedFixtureI
*/
public function load(ObjectManager $objectManager)
{
// A fake JSON library with hpp files in examples
$jsonlibr = new ExternalLibrary();
$jsonlibr->setHumanName('JSON Library');
$jsonlibr->setMachineName('jsonlib');
$jsonlibr->setActive(true);
$jsonlibr->setVerified(false);
$jsonlibr->setDescription('A library containing hpp files in examples which should be correctly fetched');
$jsonlibr->setSourceUrl('https://some/source/url.com');

// Reference to MultiIno library
$this->setReference('JsonLib', $jsonlibr);
$objectManager->persist($jsonlibr);


// A fake version of the Adafruit GPS library
$defaultLibrary = new ExternalLibrary();
$defaultLibrary->setHumanName('Default Arduino Library');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,29 @@ class LoadExternalLibraryExamplesData extends AbstractFixture implements Ordered
*/
public function load(ObjectManager $objectManager)
{
/* @var \Codebender\LibraryBundle\Entity\ExternalLibrary $jsonlibr */

$jsonlibr = $this->getReference('JsonLib');

$jsonexamplea = new Example();
$jsonexamplea->setName('JsonParserExample');
$jsonexamplea->setLibrary($jsonlibr);
$jsonexamplea->setPath('jsonlib/examples/JsonParserExample/JsonParserExample.ino');
$jsonexamplea->setBoards(null);

// Persist the new example
$objectManager->persist($jsonexamplea);

$jsonexampleb = new Example();
$jsonexampleb->setName('IndentedPrintExample');
$jsonexampleb->setLibrary($jsonlibr);
$jsonexampleb->setPath('jsonlib/examples/IndentedPrintExample/IndentedPrintExample.ino');
$jsonexampleb->setBoards(null);

// Persist the new example
$objectManager->persist($jsonexampleb);


/* @var \Codebender\LibraryBundle\Entity\ExternalLibrary $defaultLibrary */
$defaultLibrary = $this->getReference('defaultLibrary');

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@


#ifdef ARDUINO


#endif
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

#ifdef ARDUINO


#endif
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@


#ifdef ARDUINO

#endif
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#include "PrintExamplehp.hpp"

void setup() {
int x= varde+5;

}

void loop() {
// not used in this example
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#define varde 2 ;
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#ifdef ARDUINO

#endif
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#include "jsonlibex.h"

void setup() {
Serial.begin(9600);
}

void loop() {
// not used in this example
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#include "JsonLibrarycex.cpp"
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

#ifdef ARDUINO


#endif

0 comments on commit b7536e5

Please sign in to comment.