Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #361 from peuter/feature/tests
more unit tests
- Loading branch information
Showing
11 changed files
with
225 additions
and
45 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
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
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
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
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
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
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
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
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,26 @@ | ||
/** | ||
* Test the default transforms | ||
* | ||
* @author Tobias Bräutigam | ||
* @since 2016 | ||
*/ | ||
define(['TransformDefault'], function(Transform) { | ||
|
||
describe('checking default transforms', function() { | ||
|
||
it('should transform int values', function() { | ||
expect(Transform.Transform['int'].encode(0)).toEqual('0'); | ||
expect(Transform.Transform['int'].decode("0")).toEqual(0); | ||
}); | ||
|
||
it('should transform float values', function() { | ||
expect(Transform.Transform['float'].encode(0.5)).toEqual('0.5'); | ||
expect(Transform.Transform['float'].decode("0.5")).toEqual(0.5); | ||
}); | ||
|
||
it('should transform raw values', function() { | ||
expect(Transform.Transform['raw'].encode(0.5)).toEqual(0.5); | ||
expect(Transform.Transform['raw'].decode("0.5")).toEqual("0.5"); | ||
}); | ||
}); | ||
}); |
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
Oops, something went wrong.