-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🎉 (haxe-basic-cpp/) Add basic example in Haxe with C++.
- Loading branch information
Showing
17 changed files
with
102 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"version": "4.3.4", | ||
"resolveLibs": "scoped" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
-cp src | ||
-main Main | ||
-cpp build/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# @install: lix --silent download "haxelib:/ansi#1.0.0" into ansi/1.0.0/haxelib | ||
-cp ${HAXE_LIBCACHE}/ansi/1.0.0/haxelib/src | ||
-D ansi=1.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# @install: lix --silent download "haxelib:/tink_core#2.1.1" into tink_core/2.1.1/haxelib | ||
-cp ${HAXE_LIBCACHE}/tink_core/2.1.1/haxelib/src | ||
-D tink_core=2.1.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# @install: lix --silent download "haxelib:/tink_macro#1.0.3" into tink_macro/1.0.3/haxelib | ||
-lib tink_core | ||
-cp ${HAXE_LIBCACHE}/tink_macro/1.0.3/haxelib/src | ||
-D tink_macro=1.0.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# @install: lix --silent download "haxelib:/tink_priority#0.1.4" into tink_priority/0.1.4/haxelib | ||
-cp ${HAXE_LIBCACHE}/tink_priority/0.1.4/haxelib/src | ||
-D tink_priority=0.1.4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# @install: lix --silent download "haxelib:/tink_streams#0.4.0" into tink_streams/0.4.0/haxelib | ||
-lib tink_core | ||
-cp ${HAXE_LIBCACHE}/tink_streams/0.4.0/haxelib/src | ||
-D tink_streams=0.4.0 | ||
# temp for development, delete this file when pure branch merged | ||
-D pure |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# @install: lix --silent download "haxelib:/tink_syntaxhub#0.6.1" into tink_syntaxhub/0.6.1/haxelib | ||
-lib tink_macro | ||
-lib tink_priority | ||
-cp ${HAXE_LIBCACHE}/tink_syntaxhub/0.6.1/haxelib/src | ||
-D tink_syntaxhub=0.6.1 | ||
--macro tink.SyntaxHub.use() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# @install: lix --silent download "haxelib:/tink_testrunner#0.9.0" into tink_testrunner/0.9.0/haxelib | ||
-lib ansi | ||
-lib tink_macro | ||
-lib tink_streams | ||
-cp ${HAXE_LIBCACHE}/tink_testrunner/0.9.0/haxelib/src | ||
-D tink_testrunner=0.9.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# @install: lix --silent download "haxelib:/tink_unittest#0.8.0" into tink_unittest/0.8.0/haxelib | ||
-lib tink_syntaxhub | ||
-lib tink_testrunner | ||
-cp ${HAXE_LIBCACHE}/tink_unittest/0.8.0/haxelib/src | ||
-D tink_unittest=0.8.0 | ||
--macro tink.unit.AssertionBufferInjector.use() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"name": "haxe-basic-cpp", | ||
"url": "", | ||
"license": "MIT", | ||
"tags": [""], | ||
"description": "A template project of Haxe on C++.", | ||
"version": "0.0.1", | ||
"contributors": [""], | ||
"dependencies": {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"indentation": { | ||
"character": " " | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
-cp src | ||
--run Main | ||
-cpp bin/cpp/main.cpp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package basic; | ||
|
||
import Sys; | ||
|
||
class Main { | ||
static function main() { | ||
Sys.println("Hello world!"); | ||
} | ||
|
||
public static function add(a:Int, b:Int) { | ||
return a + b; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Shutout deprecated warning from tink_unittest. | ||
-w -WDeprecated | ||
-cp src | ||
-cp test | ||
-lib tink_unittest | ||
-lib tink_testrunner | ||
--run Main | ||
-cpp bin/cpp/main.cpp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import tink.unit.*; | ||
import tink.unit.Assert.*; | ||
import tink.testrunner.*; | ||
import basic.Main; | ||
|
||
class Main { | ||
static function main() { | ||
Runner.run(TestBatch.make([new Test(),])).handle(Runner.exit); | ||
} | ||
} | ||
|
||
class Test { | ||
public function new() {} | ||
|
||
public function test() | ||
return assert(basic.Main.add(1, 2) == 3); | ||
} | ||
|