Skip to content

Commit

Permalink
Added testcase in sqr() function
Browse files Browse the repository at this point in the history
  • Loading branch information
cfmitrah committed Nov 23, 2023
1 parent ffeacbc commit e17cf2f
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 e17cf2f

Please sign in to comment.