File tree Expand file tree Collapse file tree 3 files changed +10
-10
lines changed
Expand file tree Collapse file tree 3 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -8,9 +8,9 @@ describe("bencode", function() {
88 assert . deepEqual ( bencode . decode ( 'i123e' ) , 123 ) ;
99 assert . deepEqual ( bencode . decode ( 'i-123e' , 'utf8' ) , - 123 ) ;
1010 } ) ;
11- it ( 'should be able to decode a float (optional )' , function ( ) {
12- assert . deepEqual ( bencode . decode ( 'i12.3e' ) , 12.3 ) ;
13- assert . deepEqual ( bencode . decode ( 'i-12.3e' ) , - 12.3 ) ;
11+ it ( 'should be able to decode a float (as int )' , function ( ) {
12+ assert . deepEqual ( bencode . decode ( 'i12.3e' ) , 12 ) ;
13+ assert . deepEqual ( bencode . decode ( 'i-12.3e' ) , - 12 ) ;
1414 } ) ;
1515 it ( 'should be able to decode a string' , function ( ) {
1616 assert . deepEqual ( bencode . decode ( '5:asdfe' ) , new Buffer ( 'asdfe' ) ) ;
Original file line number Diff line number Diff line change @@ -8,9 +8,9 @@ describe("bencode", function() {
88 assert . deepEqual ( bencode . decode ( 'i123e' , 'utf8' ) , 123 ) ;
99 assert . deepEqual ( bencode . decode ( 'i-123e' , 'utf8' ) , - 123 ) ;
1010 } ) ;
11- it ( 'should be able to decode a float (optional )' , function ( ) {
12- assert . deepEqual ( bencode . decode ( 'i12.3e' , 'utf8' ) , 12.3 ) ;
13- assert . deepEqual ( bencode . decode ( 'i-12.3e' , 'utf8' ) , - 12.3 ) ;
11+ it ( 'should be able to decode a float (as int )' , function ( ) {
12+ assert . deepEqual ( bencode . decode ( 'i12.3e' , 'utf8' ) , 12 ) ;
13+ assert . deepEqual ( bencode . decode ( 'i-12.3e' , 'utf8' ) , - 12 ) ;
1414 } ) ;
1515 it ( 'should be able to decode a string' , function ( ) {
1616 assert . deepEqual ( bencode . decode ( '5:asdfe' , 'utf8' ) , 'asdfe' ) ;
Original file line number Diff line number Diff line change @@ -30,11 +30,11 @@ describe("bencode", function() {
3030 it ( 'should be able to encode a negative integer' , function ( ) {
3131 assert . equal ( bencode . encode ( - 123 ) , 'i-123e' ) ;
3232 } )
33- it ( 'should be able to encode a positive float (optional )' , function ( ) {
34- assert . equal ( bencode . encode ( 123.5 ) , 'i123.5e ' ) ;
33+ it ( 'should be able to encode a positive float (as int )' , function ( ) {
34+ assert . equal ( bencode . encode ( 123.5 ) , 'i123e ' ) ;
3535 } )
36- it ( 'should be able to encode a negative float (optional )' , function ( ) {
37- assert . equal ( bencode . encode ( - 123.5 ) , 'i-123.5e ' ) ;
36+ it ( 'should be able to encode a negative float (as int )' , function ( ) {
37+ assert . equal ( bencode . encode ( - 123.5 ) , 'i-123e ' ) ;
3838 } )
3939 it ( 'should be able to encode a string' , function ( ) {
4040 assert . equal ( bencode . encode ( "asdf" ) , '4:asdf' ) ;
You can’t perform that action at this time.
0 commit comments