Skip to content

Commit

Permalink
Merge pull request #69 from DoclerLabs/develop
Browse files Browse the repository at this point in the history
DoclerLabs/hexMachina#222 Drop haxe 3.2.1 support
  • Loading branch information
aliokan authored Mar 21, 2017
2 parents e25b3b0 + f68449b commit 72a3898
Show file tree
Hide file tree
Showing 24 changed files with 35 additions and 95 deletions.
9 changes: 4 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ language: haxe

# haxe versions : http://haxe.org/website-content/downloads/versions.json
haxe:
- "3.2.1"
- "3.4.0"
- development

Expand Down Expand Up @@ -58,10 +57,10 @@ install:
- haxe flash/install.hxml

script:
- if [ $TRAVIS_HAXE_VERSION != "3.2.1" ]; then haxe build-php.hxml && php bin/index.php; fi
- if [ $TRAVIS_HAXE_VERSION != "3.2.1" ]; then haxe build-neko.hxml && neko bin/MainTest.n; fi
- if [ $TRAVIS_HAXE_VERSION != "3.2.1" ]; then haxe build-js.hxml && node bin/MainTest.js; fi
- if [ $TRAVIS_HAXE_VERSION != "3.2.1" ]; then haxe build-flash.hxml -D fdb && haxe flash/run.hxml bin/MainTest.swf; fi
- haxe build-php.hxml && php bin/index.php
- haxe build-neko.hxml && neko bin/MainTest.n
- haxe build-js.hxml && node bin/MainTest.js
- haxe build-flash.hxml -D fdb && haxe flash/run.hxml bin/MainTest.swf

notifications:
email:
Expand Down
7 changes: 0 additions & 7 deletions src/hex/model/BasicModel.hx
Original file line number Diff line number Diff line change
@@ -1,21 +1,14 @@
package hex.model;

import hex.model.IModelDispatcher;

#if ( haxe_ver >= "3.3" )
import haxe.Constraints.Constructible;
#end

/**
* ...
* @author duke
*/
@:generic
#if ( haxe_ver >= "3.3" )
class BasicModel<DispatcherType:(IModelDispatcher<ListenerType>, haxe.Constraints.Constructible<Void->Void>), ListenerType: {}>
#else
class BasicModel<DispatcherType:IModelDispatcher<ListenerType>, ListenerType: {}>
#end
{
public var dispatcher : DispatcherType;

Expand Down
4 changes: 1 addition & 3 deletions test/hex/control/async/AsyncCommandTest.hx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package hex.control.async;

#if (!neko || haxe_ver >= "3.3")
import hex.control.async.AsyncCommand;
import hex.control.async.IAsyncCommandListener;
import hex.di.IDependencyInjector;
Expand Down Expand Up @@ -237,5 +236,4 @@ private class MockModule implements IModule
{
return null;
}
}
#end
}
5 changes: 1 addition & 4 deletions test/hex/control/async/AsyncCommandUtilTest.hx
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package hex.control.async;

#if (!neko || haxe_ver >= "3.3")
import haxe.Constraints.Function;
import hex.control.async.AsyncCommandUtil;
import hex.control.async.IAsyncCommand;
import hex.control.async.IAsyncCommandListener;
Expand Down Expand Up @@ -203,5 +201,4 @@ private class ASyncCommandListener implements IAsyncCommandListener
{

}
}
#end
}
9 changes: 4 additions & 5 deletions test/hex/control/async/MVCAsyncSuite.hx
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@ package hex.control.async;
class MVCAsyncSuite
{
@Suite("Async")
public var list : Array<Class<Dynamic>> = [ AsyncCommandMessageTest,
#if (!neko || haxe_ver >= "3.3")
AsyncCommandTest,
AsyncCommandUtilTest
#end
public var list : Array<Class<Dynamic>> = [
AsyncCommandMessageTest,
AsyncCommandTest,
AsyncCommandUtilTest
];

}
4 changes: 1 addition & 3 deletions test/hex/control/command/CommandExecutorTest.hx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package hex.control.command;

#if (!neko || haxe_ver >= "3.3")
import hex.MockDependencyInjector;
import hex.control.Request;
import hex.control.async.AsyncCommand;
Expand Down Expand Up @@ -225,5 +224,4 @@ private class MockImplementation implements IMockType
private interface IMockType
{

}
#end
}
12 changes: 6 additions & 6 deletions test/hex/control/command/MVCCommandSuite.hx
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ package hex.control.command;
*/
class MVCCommandSuite
{
@Suite("Command")
public var list : Array<Class<Dynamic>> = [BasicCommandTest,
#if (!neko || haxe_ver >= "3.3")
CommandExecutorTest,
#end
CommandMappingTest ];
@Suite("Command")
public var list : Array<Class<Dynamic>> = [
BasicCommandTest,
CommandExecutorTest,
CommandMappingTest
];
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package hex.control.command;

#if (!neko || haxe_ver >= "3.3")
import hex.control.Request;
import hex.control.async.AsyncCommand;
import hex.module.IModule;
Expand Down Expand Up @@ -49,5 +48,4 @@ class MockAsyncCommandForTestingExecution extends AsyncCommand
{
MockAsyncCommandForTestingExecution.cancelHandlers.push( callback );
}
}
#end
}
2 changes: 0 additions & 2 deletions test/hex/control/macro/MVCMacroSuite.hx
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ class MVCMacroSuite
{
@Suite("Macro")
public var list : Array<Class<Dynamic>> = [
#if (!neko || haxe_ver >= "3.3")
MacroExecutorTest,
MacroTest
#end
];
}
5 changes: 1 addition & 4 deletions test/hex/control/macro/MacroExecutorTest.hx
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
package hex.control.macro;

#if (!neko || haxe_ver >= "3.3")
import haxe.Timer;
import hex.MockDependencyInjector;
import hex.control.Request;
import hex.control.async.AsyncCommand;
import hex.control.async.IAsyncCommand;
import hex.control.async.IAsyncCommandListener;
import hex.control.command.BasicCommand;
import hex.control.command.CommandMapping;
import hex.control.command.ICommand;
import hex.control.command.ICommandMapping;
Expand Down Expand Up @@ -378,5 +376,4 @@ private class MockImplementation implements IMockType
private interface IMockType
{

}
#end
}
2 changes: 0 additions & 2 deletions test/hex/control/macro/MacroTest.hx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import hex.unittest.runner.MethodRunner;
*/
class MacroTest
{
#if (!neko || haxe_ver >= "3.3")
var _macro : Macro;
var _macroExecutor : MockMacroExecutor;

Expand Down Expand Up @@ -276,7 +275,6 @@ class MacroTest

Assert.equals( request, myMacro.requestPassedDuringExecution, "request should be available from prepare" );
}
#end
}

private class MockMacroExecutor implements IMacroExecutor
Expand Down
4 changes: 1 addition & 3 deletions test/hex/control/macro/MockAsyncCommand.hx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package hex.control.macro;

#if (!neko || haxe_ver >= "3.3")
import haxe.Timer;
import hex.control.async.AsyncCommand;

Expand All @@ -14,5 +13,4 @@ class MockAsyncCommand extends AsyncCommand
{
Timer.delay( this._handleComplete, 50 );
}
}
#end
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package hex.control.macro;

#if (!neko || haxe_ver >= "3.3")
import hex.control.async.AsyncCommand;
import hex.module.IModule;

Expand Down Expand Up @@ -48,5 +47,4 @@ class MockAsyncCommandForTestingExecution extends MockBasicAsyncCommand
{
MockAsyncCommandForTestingExecution.cancelHandlers.push( callback );
}
}
#end
}
4 changes: 1 addition & 3 deletions test/hex/control/macro/MockBasicAsyncCommand.hx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package hex.control.macro;

#if (!neko || haxe_ver >= "3.3")
import haxe.Timer;
import hex.control.async.AsyncCommand;

Expand All @@ -14,5 +13,4 @@ class MockBasicAsyncCommand extends AsyncCommand
{
Timer.delay( this._handleComplete, 50 );
}
}
#end
}
2 changes: 0 additions & 2 deletions test/hex/control/macro/MockMacro.hx
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ class MockMacro extends Macro
{
override function _prepare() : Void
{
#if (!neko || haxe_ver >= "3.3")
this.add( MockAsyncCommand );
#end
this.add( MockCommand );
}
}
4 changes: 1 addition & 3 deletions test/hex/control/macro/MockMacroWithHandler.hx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package hex.control.macro;

#if (!neko || haxe_ver >= "3.3")
import hex.control.async.IAsyncCommand;

/**
Expand All @@ -18,5 +17,4 @@ class MockMacroWithHandler extends Macro
{
this.add( MockCommand );
}
}
#end
}
16 changes: 1 addition & 15 deletions test/hex/control/trigger/CommandTriggerTest.hx
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package hex.control.trigger;

#if ( haxe_ver >= "3.3" )
import hex.collection.Locator;
import hex.control.async.Nothing;
import hex.control.trigger.MockCommandClassWithParameters;
import hex.control.trigger.MockCommandClassWithoutParameters;
import hex.control.trigger.mock.MockController;
Expand All @@ -12,11 +10,7 @@ import hex.control.trigger.mock.MockMacroCommand;
import hex.control.trigger.mock.MockMacroController;
import hex.control.trigger.mock.MockModule;
import hex.di.IDependencyInjector;
import hex.di.IInjectorListener;
import hex.di.Injector;
import hex.di.provider.IDependencyProvider;
import hex.domain.Domain;
import hex.event.MessageType;
import hex.log.ILogger;
import hex.module.IModule;
import hex.unittest.assertion.Assert;
Expand Down Expand Up @@ -166,12 +160,4 @@ class CommandTriggerTest
Assert.equals( vos[ 7 ], acmd.pStringMap );
Assert.equals( vos[ 8 ], acmd.pDate );
}
}
#else

class CommandTriggerTest
{
public function new(){}
}

#end
}
4 changes: 1 addition & 3 deletions test/hex/control/trigger/MVCTriggerSuite.hx
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,9 @@ class MVCTriggerSuite
{
@Suite( "Trigger" )
public var list : Array<Class<Dynamic>> =
[
#if ( haxe_ver >= "3.3" )
[
CommandTriggerTest,
CommandTriggerUserCaseTest,
#end
MacroCommandTest
];
}
4 changes: 1 addition & 3 deletions test/hex/control/trigger/mock/MockController.hx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package hex.control.trigger.mock;

#if ( haxe_ver >= "3.3" )
import hex.collection.Locator;
import hex.control.async.Expect;
import hex.control.async.Nothing;
Expand Down Expand Up @@ -31,5 +30,4 @@ class MockController
{
return a + b;
}
}
#end
}
4 changes: 1 addition & 3 deletions test/hex/control/trigger/mock/MockMacroController.hx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package hex.control.trigger.mock;

#if ( haxe_ver >= "3.3" )
import hex.collection.ILocator;
import hex.control.async.Expect;

Expand Down Expand Up @@ -41,5 +40,4 @@ class MockMacroController
sender : CommandTriggerTest,
locator : ILocator<String,Bool>
) : Expect<String>;
}
#end
}
9 changes: 5 additions & 4 deletions test/hex/event/MVCEventSuite.hx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ package hex.event;
class MVCEventSuite
{
@Suite("event")
public var list : Array<Class<Dynamic>> = [CallbackAdapterTest, ClassAdapterTest, EventProxyTest
#if (!neko || haxe_ver >= "3.3")
, MacroAdapterStrategyTest
#end
public var list : Array<Class<Dynamic>> = [
CallbackAdapterTest,
ClassAdapterTest,
EventProxyTest,
MacroAdapterStrategyTest
];
}
4 changes: 1 addition & 3 deletions test/hex/event/MacroAdapterStrategyTest.hx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package hex.event;

#if (!neko || haxe_ver >= "3.3")
import haxe.Timer;
import hex.control.macro.MacroExecutor;
import hex.di.Injector;
Expand Down Expand Up @@ -49,5 +48,4 @@ class MacroAdapterStrategyTest
Assert.equals( "test", this._result[ 0 ] );
}

}
#end
}
4 changes: 1 addition & 3 deletions test/hex/event/MockAdapterStrategyCommand.hx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package hex.event;

#if (!neko || haxe_ver >= "3.3")
import haxe.Timer;
import hex.control.async.AsyncCommand;

Expand Down Expand Up @@ -32,5 +31,4 @@ class MockAdapterStrategyCommand extends AsyncCommand
{
this._handleComplete();
}
}
#end
}
Loading

0 comments on commit 72a3898

Please sign in to comment.