Skip to content

Commit

Permalink
Merge pull request #2275 from MitrahSoft/sqr()
Browse files Browse the repository at this point in the history
Added testcase in sqr() function
  • Loading branch information
zspitzer authored Feb 1, 2024
2 parents 94753a2 + e17cf2f commit 33e03dd
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/functions/sqr.cfc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
component extends="org.lucee.cfml.test.LuceeTestCase" {
public function run( testResults, testBox ) {
describe( title="Testcase for sqr() function", body=function() {
it(title="Checking the sqr() function", body=function( currentSpec ) {
int = 64;
expect(sqr(int)).toBe(8);
expect(int.sqr()).toBe(8);
expect(isnumeric(sqr(int))).toBeTrue();
expect(sqr(4)).toBe(2);
});
});
}
}

0 comments on commit 33e03dd

Please sign in to comment.