Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

License dates updated to 2012

  • Loading branch information...
commit 58743cb21a74326975274082551c1418b704c822 1 parent 8fd2dda
@misprintt misprintt authored
Showing with 173 additions and 304 deletions.
  1. +1 −1  LICENSE.txt
  2. +0 −2  build/mcover/.gitignore
  3. +1 −1  build/mcover/LICENSE.txt
  4. +3 −3 build/mcover/example/build.hxml
  5. +1 −1  build/mcover/massive/mcover/Exception.hx
  6. +1 −1  build/mcover/massive/mcover/client/TraceClient.hx
  7. +0 −267 build/mcover/massive/mcover/data/AllClasses.hx
  8. +13 −1 build/mcover/massive/mcover/data/Clazz.hx
  9. +1 −1  build/mcover/massive/mcover/data/CoverageResult.hx
  10. +1 −1  build/mcover/massive/mcover/data/File.hx
  11. +1 −1  build/mcover/massive/mcover/data/Method.hx
  12. +16 −1 build/mcover/massive/mcover/data/Package.hx
  13. +1 −1  build/mcover/massive/mcover/data/Statement.hx
  14. +3 −1 src/massive/mcover/AllClasses.hx
  15. +1 −1  src/massive/mcover/CoverageLogger.hx
  16. +1 −1  src/massive/mcover/CoverageReportClient.hx
  17. +1 −1  src/massive/mcover/Exception.hx
  18. +1 −1  src/massive/mcover/MCover.hx
  19. +28 −0 src/massive/mcover/client/EMMAPrintClient.hx
  20. +1 −1  src/massive/mcover/client/PrintClient.hx
  21. +1 −1  src/massive/mcover/client/TraceClient.hx
  22. +1 −1  src/massive/mcover/data/AbstractBlock.hx
  23. +1 −1  src/massive/mcover/data/AbstractNode.hx
  24. +1 −1  src/massive/mcover/data/AbstractNodeList.hx
  25. +1 −1  src/massive/mcover/data/Branch.hx
  26. +1 −1  src/massive/mcover/data/Clazz.hx
  27. +1 −1  src/massive/mcover/data/Coverage.hx
  28. +1 −1  src/massive/mcover/data/CoverageResult.hx
  29. +1 −1  src/massive/mcover/data/DataUtil.hx
  30. +1 −1  src/massive/mcover/data/File.hx
  31. +81 −0 src/massive/mcover/data/Line.hx
  32. +1 −1  src/massive/mcover/data/Method.hx
  33. +1 −1  src/massive/mcover/data/Package.hx
  34. +1 −1  src/massive/mcover/data/Statement.hx
  35. +1 −1  src/massive/mcover/macro/CoverClassMacro.hx
  36. +1 −1  src/massive/mcover/munit/client/MCoverPrintClient.hx
  37. +1 −1  src/massive/mcover/util/Timer.hx
View
2  LICENSE.txt
@@ -1,4 +1,4 @@
-Copyright 2011 Massive Interactive. All rights reserved.
+Copyright 2012 Massive Interactive. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are
permitted provided that the following conditions are met:
View
2  build/mcover/.gitignore
@@ -1,2 +0,0 @@
-*
-!.gitignore
View
2  build/mcover/LICENSE.txt
@@ -1,4 +1,4 @@
-Copyright 2011 Massive Interactive. All rights reserved.
+Copyright 2012 Massive Interactive. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are
permitted provided that the following conditions are met:
View
6 build/mcover/example/build.hxml
@@ -4,7 +4,7 @@
-swf-header 1024:769:60:FFFFFF
-cp ../src
-cp src
---macro massive.mcover.MCover.include('', ['src'], null)
+--macro massive.mcover.MCover.include('', ['src'], ['*IgnoredWithFilter'])
--next
@@ -13,7 +13,7 @@
-cp ../src
-cp src
# -D MCOVER_DEBUG
---macro massive.mcover.MCover.include('', ['src'])
+--macro massive.mcover.MCover.include('', ['src'], ['*IgnoredWithFilter'])
--next
@@ -23,5 +23,5 @@
-cp ../src
-cp src
-D MCOVER_DEBUG
---macro massive.mcover.MCover.include('', ['src'])
+--macro massive.mcover.MCover.include('', ['src'], ['*IgnoredWithFilter'])
-cmd neko build/main.n
View
2  build/mcover/massive/mcover/Exception.hx
@@ -1,5 +1,5 @@
/****
-* Copyright 2011 Massive Interactive. All rights reserved.
+* Copyright 2012 Massive Interactive. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
View
2  build/mcover/massive/mcover/client/TraceClient.hx
@@ -1,5 +1,5 @@
/****
-* Copyright 2011 Massive Interactive. All rights reserved.
+* Copyright 2012 Massive Interactive. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
View
267 build/mcover/massive/mcover/data/AllClasses.hx
@@ -1,267 +0,0 @@
-/****
-* Copyright 2011 Massive Interactive. All rights reserved.
-*
-* Redistribution and use in source and binary forms, with or without modification, are
-* permitted provided that the following conditions are met:
-*
-* 1. Redistributions of source code must retain the above copyright notice, this list of
-* conditions and the following disclaimer.
-*
-* 2. Redistributions in binary form must reproduce the above copyright notice, this list
-* of conditions and the following disclaimer in the documentation and/or other materials
-* provided with the distribution.
-*
-* THIS SOFTWARE IS PROVIDED BY MASSIVE INTERACTIVE ``AS IS'' AND ANY EXPRESS OR IMPLIED
-* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MASSIVE INTERACTIVE OR
-* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*
-* The views and conclusions contained in the software and documentation are those of the
-* authors and should not be interpreted as representing official policies, either expressed
-* or implied, of Massive Interactive.
-****/
-
-package massive.mcover.data;
-
-import massive.mcover.data.CoverageResult;
-import massive.mcover.data.Branch;
-
-@:keep class AllClasses extends AbstractNodeList
-{
- var statements:IntHash<Array<Int>>;
- var branches:IntHash<Array<Int>>;
-
- /*
- * total execution count for statements by id
- */
- public var statementResultsById(default, null):IntHash<Int>;
-
- /*
- * total execution summary for branches by id
- */
- public var branchResultsById(default, null):IntHash<BranchResult>;
-
- public function new()
- {
- super();
- statements = new IntHash();
- branches = new IntHash();
- statementResultsById = new IntHash();
- branchResultsById = new IntHash();
- }
-
- public function setStatementResultsHash(hash:IntHash<Int>)
- {
- statementResultsById = hash;
- }
-
- public function setBranchResultsHash(hash:IntHash<BranchResult>)
- {
- branchResultsById = hash;
- }
-
- public function addStatement(block:Statement)
- {
- verifyBlockData(block);
- if(statements.exists(block.id)) throw new Exception("Statement already exists: " + block.id + " " + block.toString());
-
- var packg = cast(getItemByName(block.packageName, Package), Package);
- var file = cast(packg.getItemByName(block.file, File), File);
- var clazz = cast(file.getItemByName(block.qualifiedClassName, Clazz), Clazz);
- var method = cast(clazz.getItemByName(block.methodName, Method), Method);
-
- method.addStatement(block);
-
- block.lookup = [packg.id, file.id, clazz.id,method.id,block.id];
- statements.set(block.id, block.lookup.concat([]));
- }
-
- public function addBranch(block:Branch)
- {
- verifyBlockData(block);
- if(branches.exists(block.id)) throw new Exception("Branch already exists: " + block.id + " " + block.toString());
-
- var packg = cast(getItemByName(block.packageName, Package), Package);
- var file = cast(packg.getItemByName(block.file, File), File);
- var clazz = cast(file.getItemByName(block.qualifiedClassName, Clazz), Clazz);
- var method = cast(clazz.getItemByName(block.methodName, Method), Method);
-
- method.addBranch(block);
-
- block.lookup = [packg.id, file.id, clazz.id,method.id,block.id];
- branches.set(block.id, block.lookup.concat([]));
- }
-
- function verifyBlockData(block:AbstractBlock)
- {
- if(block.id == null) throw new Exception("id cannot be null");
- if(block.packageName == null) throw new Exception("packageName cannot be null");
- if(block.file == null) throw new Exception("file cannot be null");
- if(block.qualifiedClassName == null) throw new Exception("qualifiedClassName cannot be null");
- if(block.methodName == null) throw new Exception("methodName cannot be null");
- }
-
- public function getBranchById(id:Int):Branch
- {
- if(!branches.exists(id)) throw new Exception("Branch does not exist: " + id);
-
- var lookup:Array<Int> = branches.get(id).concat([]);
- return lookupBranch(lookup);
- }
-
-
- public function getStatementById(id:Int):Statement
- {
- if(!statements.exists(id)) throw new Exception("Statement does not exist: " + id);
- var lookup:Array<Int> = statements.get(id).concat([]);
- return lookupStatement(lookup);
- }
-
-
-
- override public function getMissingBranches():Array<Branch>
- {
- var a = super.getMissingBranches();
- a.sort(sortOnNodeId);
- return a;
- }
-
- override public function getMissingStatements():Array<Statement>
- {
- var a = super.getMissingStatements();
- a.sort(sortOnNodeId);
- return a;
- }
-
- override public function getClasses():Array<Clazz>
- {
- var a = super.getClasses();
- a.sort(sortOnClazzId);
- return a;
- }
-
- public function getClassByName(name:String):Clazz
- {
- var index = name.lastIndexOf(".");
-
- var packageName = index > 1 ? name.substr(0, index) : "";
-
- if(!items.exists(packageName)) return null;
-
- var pckgId = items.get(packageName);
-
- var pckg = cast(itemsById.get(pckgId), Package);
-
- var classes = pckg.getClasses();
-
- for(cls in classes)
- {
- if(cls.name == name)
- {
- return cls;
- }
- }
-
- return null;
- }
-
- public function getPackages():Array<Package>
- {
- var a:Array<Package> = [];
- for(item in itemsById)
- {
- a.push(cast(item, Package));
- }
- a.sort(sortOnPackageId);
-
- return a;
- }
-
- override public function getResults(?cache:Bool=true):CoverageResult
- {
- if(resultCache == null || !cache)
- {
- for(lookup in statements)
- {
- var statement = lookupStatement(lookup.concat([]));
- if(statementResultsById.exists(statement.id))
- {
- statement.count = statementResultsById.get(statement.id);
- }
- else
- {
- statement.count = 0;
- }
- }
-
-
- for(lookup in branches)
- {
- var branch = lookupBranch(lookup.concat([]));
- if(branchResultsById.exists(branch.id))
- {
- var result = branchResultsById.get(branch.id);
- branch.trueCount = result.trueCount;
- branch.falseCount = result.falseCount;
- }
- else
- {
- branch.trueCount = 0;
- branch.falseCount = 0;
- }
- }
-
- super.getResults(cache);
- }
- return resultCache;
- }
-
- override function appendResults(to:CoverageResult, from:CoverageResult):CoverageResult
- {
- to = super.appendResults(to, from);
- to.pc += (from.sc > 0) ? 1 : 0;
- to.p += 1;
- return to;
- }
-
- ///////////////
-
- function sortOnNodeId(a:AbstractNode, b:AbstractNode)
- {
- return a.id-b.id;
- }
-
- function sortOnClazzId(a:Clazz, b:Clazz)
- {
- return a.id-b.id;
- }
-
- function sortOnPackageId(a:Package, b:Package)
- {
- return a.id-b.id;
- }
-
- override function hxSerialize( s : haxe.Serializer )
- {
- super.hxSerialize(s);
- s.serialize(statements);
- s.serialize(branches);
- s.serialize(statementResultsById);
- s.serialize(branchResultsById);
-
- }
-
- override function hxUnserialize( s : haxe.Unserializer )
- {
- super.hxUnserialize(s);
- statements = s.unserialize();
- branches = s.unserialize();
- statementResultsById = s.unserialize();
- branchResultsById = s.unserialize();
- }
-}
View
14 build/mcover/massive/mcover/data/Clazz.hx
@@ -1,5 +1,5 @@
/****
-* Copyright 2011 Massive Interactive. All rights reserved.
+* Copyright 2012 Massive Interactive. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
@@ -34,6 +34,18 @@ import massive.mcover.data.CoverageResult;
{
super();
}
+ public function getMethods():Array<Method>
+ {
+ var a:Array<Method> = [];
+ for(item in itemsById)
+ {
+ if(Type.getClass(item) == Method)
+ {
+ a.push(cast(item, Method));
+ }
+ }
+ return a;
+ }
override function appendResults(to:CoverageResult, from:CoverageResult):CoverageResult
{
View
2  build/mcover/massive/mcover/data/CoverageResult.hx
@@ -1,5 +1,5 @@
/****
-* Copyright 2011 Massive Interactive. All rights reserved.
+* Copyright 2012 Massive Interactive. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
View
2  build/mcover/massive/mcover/data/File.hx
@@ -1,5 +1,5 @@
/****
-* Copyright 2011 Massive Interactive. All rights reserved.
+* Copyright 2012 Massive Interactive. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
View
2  build/mcover/massive/mcover/data/Method.hx
@@ -1,5 +1,5 @@
/****
-* Copyright 2011 Massive Interactive. All rights reserved.
+* Copyright 2012 Massive Interactive. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
View
17 build/mcover/massive/mcover/data/Package.hx
@@ -1,5 +1,5 @@
/****
-* Copyright 2011 Massive Interactive. All rights reserved.
+* Copyright 2012 Massive Interactive. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
@@ -37,6 +37,19 @@ import massive.mcover.data.CoverageResult;
super();
}
+ public function getFiles():Array<File>
+ {
+ var a:Array<File> = [];
+ for(item in itemsById)
+ {
+ if(Type.getClass(item) == File)
+ {
+ a.push(cast(item, File));
+ }
+ }
+ return a;
+ }
+
override function appendResults(to:CoverageResult, from:CoverageResult):CoverageResult
{
to = super.appendResults(to, from);
@@ -44,4 +57,6 @@ import massive.mcover.data.CoverageResult;
to.f += 1;
return to;
}
+
+
}
View
2  build/mcover/massive/mcover/data/Statement.hx
@@ -1,5 +1,5 @@
/****
-* Copyright 2011 Massive Interactive. All rights reserved.
+* Copyright 2012 Massive Interactive. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
View
4 src/massive/mcover/AllClasses.hx
@@ -1,5 +1,5 @@
/****
-* Copyright 2011 Massive Interactive. All rights reserved.
+* Copyright 2012 Massive Interactive. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
@@ -28,6 +28,7 @@
package massive.mcover;
+import massive.mcover.client.EMMAPrintClient;
import massive.mcover.client.PrintClient;
import massive.mcover.client.TraceClient;
import massive.mcover.CoverageLogger;
@@ -41,6 +42,7 @@ import massive.mcover.data.Coverage;
import massive.mcover.data.CoverageResult;
import massive.mcover.data.DataUtil;
import massive.mcover.data.File;
+import massive.mcover.data.Line;
import massive.mcover.data.Method;
import massive.mcover.data.Package;
import massive.mcover.data.Statement;
View
2  src/massive/mcover/CoverageLogger.hx
@@ -1,5 +1,5 @@
/****
-* Copyright 2011 Massive Interactive. All rights reserved.
+* Copyright 2012 Massive Interactive. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
View
2  src/massive/mcover/CoverageReportClient.hx
@@ -1,5 +1,5 @@
/****
-* Copyright 2011 Massive Interactive. All rights reserved.
+* Copyright 2012 Massive Interactive. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
View
2  src/massive/mcover/Exception.hx
@@ -1,5 +1,5 @@
/****
-* Copyright 2011 Massive Interactive. All rights reserved.
+* Copyright 2012 Massive Interactive. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
View
2  src/massive/mcover/MCover.hx
@@ -1,5 +1,5 @@
/****
-* Copyright 2011 Massive Interactive. All rights reserved.
+* Copyright 2012 Massive Interactive. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
View
28 src/massive/mcover/client/EMMAPrintClient.hx
@@ -1,3 +1,31 @@
+/****
+* Copyright 2012 Massive Interactive. All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without modification, are
+* permitted provided that the following conditions are met:
+*
+* 1. Redistributions of source code must retain the above copyright notice, this list of
+* conditions and the following disclaimer.
+*
+* 2. Redistributions in binary form must reproduce the above copyright notice, this list
+* of conditions and the following disclaimer in the documentation and/or other materials
+* provided with the distribution.
+*
+* THIS SOFTWARE IS PROVIDED BY MASSIVE INTERACTIVE ``AS IS'' AND ANY EXPRESS OR IMPLIED
+* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MASSIVE INTERACTIVE OR
+* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*
+* The views and conclusions contained in the software and documentation are those of the
+* authors and should not be interpreted as representing official policies, either expressed
+* or implied, of Massive Interactive.
+****/
+
package massive.mcover.client;
import massive.mcover.CoverageReportClient;
View
2  src/massive/mcover/client/PrintClient.hx
@@ -1,5 +1,5 @@
/****
-* Copyright 2011 Massive Interactive. All rights reserved.
+* Copyright 2012 Massive Interactive. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
View
2  src/massive/mcover/client/TraceClient.hx
@@ -1,5 +1,5 @@
/****
-* Copyright 2011 Massive Interactive. All rights reserved.
+* Copyright 2012 Massive Interactive. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
View
2  src/massive/mcover/data/AbstractBlock.hx
@@ -1,5 +1,5 @@
/****
-* Copyright 2011 Massive Interactive. All rights reserved.
+* Copyright 2012 Massive Interactive. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
View
2  src/massive/mcover/data/AbstractNode.hx
@@ -1,5 +1,5 @@
/****
-* Copyright 2011 Massive Interactive. All rights reserved.
+* Copyright 2012 Massive Interactive. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
View
2  src/massive/mcover/data/AbstractNodeList.hx
@@ -1,5 +1,5 @@
/****
-* Copyright 2011 Massive Interactive. All rights reserved.
+* Copyright 2012 Massive Interactive. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
View
2  src/massive/mcover/data/Branch.hx
@@ -1,5 +1,5 @@
/****
-* Copyright 2011 Massive Interactive. All rights reserved.
+* Copyright 2012 Massive Interactive. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
View
2  src/massive/mcover/data/Clazz.hx
@@ -1,5 +1,5 @@
/****
-* Copyright 2011 Massive Interactive. All rights reserved.
+* Copyright 2012 Massive Interactive. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
View
2  src/massive/mcover/data/Coverage.hx
@@ -1,5 +1,5 @@
/****
-* Copyright 2011 Massive Interactive. All rights reserved.
+* Copyright 2012 Massive Interactive. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
View
2  src/massive/mcover/data/CoverageResult.hx
@@ -1,5 +1,5 @@
/****
-* Copyright 2011 Massive Interactive. All rights reserved.
+* Copyright 2012 Massive Interactive. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
View
2  src/massive/mcover/data/DataUtil.hx
@@ -1,5 +1,5 @@
/****
-* Copyright 2011 Massive Interactive. All rights reserved.
+* Copyright 2012 Massive Interactive. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
View
2  src/massive/mcover/data/File.hx
@@ -1,5 +1,5 @@
/****
-* Copyright 2011 Massive Interactive. All rights reserved.
+* Copyright 2012 Massive Interactive. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
View
81 src/massive/mcover/data/Line.hx
@@ -0,0 +1,81 @@
+/****
+* Copyright 2012 Massive Interactive. All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without modification, are
+* permitted provided that the following conditions are met:
+*
+* 1. Redistributions of source code must retain the above copyright notice, this list of
+* conditions and the following disclaimer.
+*
+* 2. Redistributions in binary form must reproduce the above copyright notice, this list
+* of conditions and the following disclaimer in the documentation and/or other materials
+* provided with the distribution.
+*
+* THIS SOFTWARE IS PROVIDED BY MASSIVE INTERACTIVE ``AS IS'' AND ANY EXPRESS OR IMPLIED
+* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MASSIVE INTERACTIVE OR
+* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*
+* The views and conclusions contained in the software and documentation are those of the
+* authors and should not be interpreted as representing official policies, either expressed
+* or implied, of Massive Interactive.
+****/
+
+package massive.mcover.data;
+
+class Line extends AbstractBlock
+{
+ public var start(default, null):Int;
+ public var end(default, null):Int;
+
+ public var count:Int;
+
+ public var length(default, null):Int;
+
+ public function new()
+ {
+ super();
+ count = 0;
+ start = 0;
+ end = 0;
+ length = 0;
+ }
+
+ override public function isCovered():Bool
+ {
+ return count > 0;
+ }
+
+ public function populate(start:Int, end:Int)
+ {
+ this.start = start;
+ this.end = end;
+ length = end-start;
+ }
+
+
+ ///////////
+
+ override function hxSerialize( s : haxe.Serializer )
+ {
+ super.hxSerialize(s);
+ s.serialize(count);
+ s.serialize(start);
+ s.serialize(end);
+ }
+
+ override function hxUnserialize( s : haxe.Unserializer )
+ {
+ super.hxUnserialize(s);
+ count = s.unserialize();
+ start = s.unserialize();
+ end = s.unserialize();
+
+ length = end-start;
+ }
+}
View
2  src/massive/mcover/data/Method.hx
@@ -1,5 +1,5 @@
/****
-* Copyright 2011 Massive Interactive. All rights reserved.
+* Copyright 2012 Massive Interactive. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
View
2  src/massive/mcover/data/Package.hx
@@ -1,5 +1,5 @@
/****
-* Copyright 2011 Massive Interactive. All rights reserved.
+* Copyright 2012 Massive Interactive. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
View
2  src/massive/mcover/data/Statement.hx
@@ -1,5 +1,5 @@
/****
-* Copyright 2011 Massive Interactive. All rights reserved.
+* Copyright 2012 Massive Interactive. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
View
2  src/massive/mcover/macro/CoverClassMacro.hx
@@ -1,5 +1,5 @@
/****
-* Copyright 2011 Massive Interactive. All rights reserved.
+* Copyright 2012 Massive Interactive. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
View
2  src/massive/mcover/munit/client/MCoverPrintClient.hx
@@ -1,5 +1,5 @@
/****
-* Copyright 2011 Massive Interactive. All rights reserved.
+* Copyright 2012 Massive Interactive. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
View
2  src/massive/mcover/util/Timer.hx
@@ -1,5 +1,5 @@
/****
-* Copyright 2011 Massive Interactive. All rights reserved.
+* Copyright 2012 Massive Interactive. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
Please sign in to comment.
Something went wrong with that request. Please try again.