Skip to content

Commit

Permalink
Merge pull request #81 from DoclerLabs/develop
Browse files Browse the repository at this point in the history
prepare 0.35.0
  • Loading branch information
aliokan authored Feb 19, 2018
2 parents da63d92 + 7f967d4 commit 7de1918
Show file tree
Hide file tree
Showing 32 changed files with 43 additions and 60 deletions.
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ install:
#hexUnit
- git clone --recursive -b $DEPENDENCIES_BRANCH https://github.com/DoclerLabs/hexUnit.git ./hexunit
- haxelib dev hexunit ./hexunit
#tink_macro
- haxelib install tink_macro 0.16.1
#hexCore
- haxelib dev hexcore .
- haxelib path hexcore
- export DISPLAY=:99.0;
Expand Down
5 changes: 3 additions & 2 deletions haxelib.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@
"releasenote": "First release. Still alpha testing",
"version": "git",
"url": "https://github.com/DoclerLabs/hexCore",
"dependencies":
"dependencies":
{
"hexlog": "git:https://github.com/DoclerLabs/hexLog.git"
"hexlog": "git:https://github.com/DoclerLabs/hexLog.git",
"tink_macro": "0.16.1"
}
}
19 changes: 17 additions & 2 deletions src/hex/util/MacroUtil.hx
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ class MacroUtil
}
}

static public function getIdent( e : Expr ) : String
{
return switch( e.expr ) { case EConst(CIdent(id)): id; case _: null; };
}

static public function getClassName( ct : ClassType ) : String
{
return ct.pack.join( "." ) + "." + ct.name;
Expand Down Expand Up @@ -143,7 +148,7 @@ class MacroUtil
}
}

static public function getClassType( qualifiedClassName : String, position : Position = null ) : ClassType
static public function getClassType( qualifiedClassName : String, position : Position = null, shouldThrow = true ) : ClassType
{
var type = null;

Expand All @@ -153,7 +158,14 @@ class MacroUtil
}
catch( e : Dynamic )
{
Context.error( "Fails to retrieve ClassType for class named '" + qualifiedClassName + "'\nError caught: " + e, position == null ? Context.currentPos() : position );
if ( shouldThrow )
{
Context.error( "Fails to retrieve ClassType for class named '" + qualifiedClassName + "'\nError caught: " + e, position == null ? Context.currentPos() : position );
}
else
{
return null;
}
}

switch type
Expand Down Expand Up @@ -319,5 +331,8 @@ class MacroUtil
return TypeTools.toComplexType(
Context.typeof(
Context.parseInlineString( '( null : ${typeName})', Context.currentPos() ) ) );

static public inline function getTypeFromString( typeName : String ) : haxe.macro.Type
return Context.typeof( Context.parseInlineString( '( null : ${typeName})', Context.currentPos() ) );
#end
}
20 changes: 20 additions & 0 deletions src/hex/util/TinkHelper.hx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package hex.util;

#if macro
using tink.MacroApi;

/**
* ...
* @author Francis Bourre
*/
class TinkHelper
{
function new() {}

static public function fcqn( ct : haxe.macro.Expr.ComplexType ) : String
{
var s = ct.toType().sure().toComplex().toString();
return s.split( 'StdTypes.' ).join( '' ).split(' ').join('');
}
}
#end
2 changes: 0 additions & 2 deletions test/hex/collection/ArrayMapTest.hx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ import hex.unittest.assertion.Assert;
*/
class ArrayMapTest
{
public function new() { }

var _map : ArrayMap<MockKeyClass, MockValueClass>;

@Before
Expand Down
2 changes: 0 additions & 2 deletions test/hex/collection/HashMapTest.hx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ import hex.unittest.assertion.Assert;
*/
class HashMapTest
{
public function new() { }

var _map : HashMap<MockKeyClass, MockValueClass>;

@Before
Expand Down
2 changes: 0 additions & 2 deletions test/hex/collection/LocatorMessageTest.hx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ import hex.unittest.assertion.Assert;
*/
class LocatorMessageTest
{
public function new() { }

@Test( "test constructor is private" )
public function testPrivateConstructor() : Void
{
Expand Down
2 changes: 0 additions & 2 deletions test/hex/collection/LocatorTest.hx
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ import hex.unittest.assertion.Assert;
*/
class LocatorTest
{
public function new() { }

var _locator : MockLocator;

@Before
Expand Down
2 changes: 0 additions & 2 deletions test/hex/control/AsyncCallbackTest.hx
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ import hex.unittest.assertion.Assert;
*/
class AsyncCallbackTest
{
public function new() { }

@Test( 'Test with argument result' )
public function testWithArgumentResult() : Void
{
Expand Down
2 changes: 0 additions & 2 deletions test/hex/control/payload/ExecutionPayloadTest.hx
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ class ExecutionPayloadTest
{
var _data : MockData;
var _executionPayload : ExecutionPayload;

public function new() { }

@Before
public function setUp() : Void
Expand Down
2 changes: 0 additions & 2 deletions test/hex/control/payload/PayloadUtilTest.hx
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ import hex.unittest.assertion.Assert;
*/
class PayloadUtilTest
{
public function new() { }

@Test( "test constructor is private" )
public function testPrivateConstructor() : Void
{
Expand Down
2 changes: 0 additions & 2 deletions test/hex/core/HashCodeFactoryTest.hx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ import hex.unittest.assertion.Assert;

class HashCodeFactoryTest
{
public function new() { }

@Test( "test constructor is private" )
public function testPrivateConstructor() : Void
{
Expand Down
2 changes: 0 additions & 2 deletions test/hex/data/GUIDTest.hx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ import hex.unittest.assertion.Assert;
*/
class GUIDTest
{
public function new() { }

@Test( "test constructor is private" )
public function testPrivateConstructor() : Void
{
Expand Down
2 changes: 0 additions & 2 deletions test/hex/domain/DefaultDomainTest.hx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ import hex.unittest.assertion.Assert;
*/
class DefaultDomainTest
{
public function new() { }

@Test( "Test if DefaultDomain static variable exists" )
public function testIfDefaultDomainStaticVariableExists() : Void
{
Expand Down
2 changes: 0 additions & 2 deletions test/hex/domain/DomainTest.hx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ import hex.unittest.assertion.Assert;
*/
class DomainTest
{
public function new() { }

@Test( "Test 'name' property passed to constructor" )
public function testConstructor() : Void
{
Expand Down
2 changes: 0 additions & 2 deletions test/hex/domain/NoDomainTest.hx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ import hex.unittest.assertion.Assert;
*/
class NoDomainTest
{
public function new() { }

@Test( "Test if NoDomain static variable exists" )
public function testIfNoDomainStaticVariableExists() : Void
{
Expand Down
2 changes: 0 additions & 2 deletions test/hex/domain/TopLevelDomainTest.hx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ import hex.unittest.assertion.Assert;
*/
class TopLevelDomainTest
{
public function new() { }

@Test( "Test if 'TopLevelDomain' static variable exists" )
public function testIfTopLevelDomainStaticVariableExists() : Void
{
Expand Down
2 changes: 0 additions & 2 deletions test/hex/error/ExceptionTest.hx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ import hex.unittest.assertion.Assert;
*/
class ExceptionTest
{
public function new() { }

@Test( "Test 'name' property passed to constructor" )
public function testConstructor() : Void
{
Expand Down
2 changes: 0 additions & 2 deletions test/hex/event/BasicEventTest.hx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ import hex.unittest.assertion.Assert;
*/
class BasicEventTest
{
public function new() { }

@Test( "Test 'type' parameter passed to constructor" )
public function testType() : Void
{
Expand Down
2 changes: 0 additions & 2 deletions test/hex/event/ClosuredispatcherTest.hx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ class ClosuredispatcherTest
var _dispatcher : ClosureDispatcher;
var _listener : MockEventListener;

public function new() { }

@Before
public function setUp() : Void
{
Expand Down
2 changes: 0 additions & 2 deletions test/hex/event/CompositeDispatcherTest.hx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ class CompositeDispatcherTest
{
var _dispatcher : CompositeDispatcher;

public function new() { }

@Before
public function setUp() : Void
{
Expand Down
2 changes: 0 additions & 2 deletions test/hex/event/DispatcherTest.hx
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ class DispatcherTest
var _dispatcher : Dispatcher<IMockListener>;
var _listener : MockEventListener;

public function new() { }

@Before
public function setUp() : Void
{
Expand Down
2 changes: 0 additions & 2 deletions test/hex/event/FullClosureDispatcherTest.hx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ class FullClosureDispatcherTest
var _dispatcher : FullClosureDispatcher;
var _listener : MockEventListener;

public function new() { }

@Before
public function setUp() : Void
{
Expand Down
2 changes: 0 additions & 2 deletions test/hex/event/TriggerTest.hx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ import hex.unittest.assertion.Assert;
*/
class TriggerTest
{
public function new() { }

@Test( "test trigger instantiation and callbacks" )
public function testTriggerInstantiationAndCallbacks() : Void
{
Expand Down
2 changes: 0 additions & 2 deletions test/hex/model/ModelDispatcherTest.hx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ class ModelDispatcherTest
{
var _dispatcher : MockDispatcher;

public function new() { }

@Before
public function setUp() : Void
{
Expand Down
2 changes: 0 additions & 2 deletions test/hex/service/ServiceConfigurationTest.hx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ import hex.unittest.assertion.Assert;
*/
class ServiceConfigurationTest
{
public function new() { }

@Test( "Test 'timeout' property passed to constructor" )
public function testConstructor() : Void
{
Expand Down
2 changes: 0 additions & 2 deletions test/hex/structures/PointFTest.hx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ import hex.unittest.assertion.Assert;
*/
class PointFTest
{
public function new() { }

@Test( "test constructor" )
public function testConstructor()
{
Expand Down
2 changes: 0 additions & 2 deletions test/hex/structures/PointFactoryTest.hx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ import hex.unittest.assertion.Assert;
*/
class PointFactoryTest
{
public function new() { }

@Test( "test constructor is private" )
public function testPrivateConstructor() : Void
{
Expand Down
2 changes: 0 additions & 2 deletions test/hex/structures/PointTest.hx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ import hex.unittest.assertion.Assert;
*/
class PointTest
{
public function new() { }

@Test( "test constructor" )
public function testConstructor()
{
Expand Down
2 changes: 0 additions & 2 deletions test/hex/structures/SizeTest.hx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ import hex.unittest.assertion.Assert;
*/
class SizeTest
{
public function new() { }

@Test( "Test 'width' and 'height' property passed to constructor" )
public function testConstructor() : Void
{
Expand Down
2 changes: 0 additions & 2 deletions test/hex/util/ClassUtilTest.hx
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ class ClassUtilTest
public static var STATIC_REF : String = "static_ref";
public static inline var STATIC_INLINE_REF : String = "static_inline_ref";

public function new() { }

@Test( "test constructor is private" )
public function testPrivateConstructor() : Void
{
Expand Down
2 changes: 0 additions & 2 deletions test/hex/util/StringifierTest.hx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ import hex.unittest.assertion.Assert;
*/
class StringifierTest
{
public function new() { }

@Test( "test constructor is private" )
public function testPrivateConstructor() : Void
{
Expand Down

0 comments on commit 7de1918

Please sign in to comment.