@@ -48,17 +48,18 @@ suite('Trigonometry', function() {
4848 suite ( 'p5.prototype.angleMode' , function ( ) {
4949 test ( 'should set constant to DEGREES' , function ( ) {
5050 myp5 . angleMode ( DEGREES ) ;
51- assert . equal ( myp5 . _angleMode , 'degrees' ) ;
51+ assert . equal ( myp5 . angleMode ( ) , 'degrees' ) ;
5252 } ) ;
5353
5454 test ( 'should set constant to RADIANS' , function ( ) {
5555 myp5 . angleMode ( RADIANS ) ;
56- assert . equal ( myp5 . _angleMode , 'radians' ) ;
56+ assert . equal ( myp5 . angleMode ( ) , 'radians' ) ;
5757 } ) ;
5858
59- test ( 'should always be RADIANS or DEGREES' , function ( ) {
60- myp5 . angleMode ( 'wtflolzkk' ) ;
61- assert . equal ( myp5 . _angleMode , 'radians' ) ;
59+ test ( 'wrong param type' , function ( ) {
60+ assert . validationError ( function ( ) {
61+ myp5 . angleMode ( 'wtflolzkk' ) ;
62+ } ) ;
6263 } ) ;
6364
6465 test ( 'should return radians' , function ( ) {
@@ -70,6 +71,11 @@ suite('Trigonometry', function() {
7071 myp5 . angleMode ( DEGREES ) ;
7172 assert . equal ( myp5 . angleMode ( ) , 'degrees' ) ;
7273 } ) ;
74+
75+ test ( 'should always be RADIANS or DEGREES' , function ( ) {
76+ myp5 . angleMode ( 'wtflolzkk' ) ;
77+ assert . equal ( myp5 . angleMode ( ) , 'radians' ) ;
78+ } ) ;
7379 } ) ;
7480
7581 suite ( 'p5.prototype.degrees' , function ( ) {
0 commit comments