~ubuntu-branches/ubuntu/intrepid/ruby1.9/intrepid-updates

« back to all changes in this revision

Viewing changes to test/json/test_json_generate.rb

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2007-09-04 16:01:17 UTC
  • mfrom: (1.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20070904160117-i15zckg2nhxe9fyw
Tags: 1.9.0+20070830-2ubuntu1
* Sync from Debian; remaining changes:
  - Add -g to CFLAGS.
* Fixes build failure on ia64.
* Fixes build failure with gcc-4.2 on lpia.
* Robustify check for target_os, fixing build failure on lpia.
* Set Ubuntu maintainer address.

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
 
41
41
  def test_unparse
42
42
    json = unparse(@hash)
43
 
    assert_equal(@json2, json)
 
43
    assert_equal(JSON.parse(@json2), JSON.parse(json))
44
44
    parsed_json = parse(json)
45
45
    assert_equal(@hash, parsed_json)
46
46
    json = generate({1=>2})
51
51
 
52
52
  def test_unparse_pretty
53
53
    json = pretty_unparse(@hash)
54
 
    assert_equal(@json3, json)
 
54
    assert_equal(JSON.parse(@json3), JSON.parse(json))
55
55
    parsed_json = parse(json)
56
56
    assert_equal(@hash, parsed_json)
57
57
    json = pretty_generate({1=>2})