test_double_serializer.expected 665 B

123456789101112131415161718
  1. Test default serializer:
  2. obj.to_string(standard)=0.5
  3. Test default serializer with custom userdata:
  4. obj.to_string(userdata)=0.5
  5. Test explicit serializer with custom userdata:
  6. obj.to_string(custom)=test
  7. Test reset serializer:
  8. obj.to_string(reset)=0.5
  9. obj.to_string(default format)=0.52381
  10. obj.to_string(with global format)=x0.524y
  11. obj.to_string(with thread format)=T0.52X
  12. obj.to_string(long thread format)=Ttttttttttttt0.52xxxxxxxxxxxxxxxxxxX
  13. obj.to_string(back to global format)=x0.524y
  14. obj.to_string(back to default format)=0.52381
  15. obj(12.0).to_string(default format)=12.0
  16. obj(12.0).to_string(%.0f)=12
  17. obj(12.0).to_string(%.0g)=1e+01
  18. obj(12.0).to_string(%.1g)=12.0