github.com/minio/simdjson-go@v0.4.6-0.20231116094823-04d21cddf993/simdjson_amd64_test.go (about)

     1  //go:build !noasm && !appengine && gc
     2  // +build !noasm,!appengine,gc
     3  
     4  /*
     5   * MinIO Cloud Storage, (C) 2020 MinIO, Inc.
     6   *
     7   * Licensed under the Apache License, Version 2.0 (the "License");
     8   * you may not use this file except in compliance with the License.
     9   * You may obtain a copy of the License at
    10   *
    11   *     http://www.apache.org/licenses/LICENSE-2.0
    12   *
    13   * Unless required by applicable law or agreed to in writing, software
    14   * distributed under the License is distributed on an "AS IS" BASIS,
    15   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    16   * See the License for the specific language governing permissions and
    17   * limitations under the License.
    18   */
    19  
    20  package simdjson
    21  
    22  import (
    23  	"encoding/json"
    24  	"reflect"
    25  	"strings"
    26  	"testing"
    27  )
    28  
    29  func TestParseND(t *testing.T) {
    30  	if !SupportedCPU() {
    31  		t.SkipNow()
    32  	}
    33  	tests := []struct {
    34  		name       string
    35  		skipFloats bool // Skip tests that contain float64 inprecisions (see GOLANG_NUMBER_PARSING flag)
    36  		js         string
    37  		want       string
    38  		wantErr    bool
    39  	}{
    40  		{
    41  			name: "demo",
    42  			js: `{"three":true,"two":"foo","one":-1}
    43  {"three":false,"two":"bar","one":null}
    44  {"three":true,"two":"baz","one":2.5}`,
    45  			want: `{"three":true,"two":"foo","one":-1}
    46  {"three":false,"two":"bar","one":null}
    47  {"three":true,"two":"baz","one":2.5}`,
    48  			wantErr: false,
    49  		},
    50  		{
    51  			name:    "valid",
    52  			js:      `{"bimbam":12345465.447,"bumbum":true,"istrue":true,"isfalse":false,"aap":null}`,
    53  			want:    `{"bimbam":12345465.447,"bumbum":true,"istrue":true,"isfalse":false,"aap":null}`,
    54  			wantErr: false,
    55  		},
    56  		{
    57  			name:       "floatinvalid",
    58  			skipFloats: true,
    59  			js:         `{"bimbam":12345465.44j7,"bumbum":true}`,
    60  			wantErr:    true,
    61  		},
    62  		{
    63  			name:       "numberinvalid",
    64  			skipFloats: true,
    65  			js:         `{"bimbam":1234546544j7}`,
    66  			wantErr:    true,
    67  		},
    68  		{
    69  			name:    "emptyobject",
    70  			js:      `{}`,
    71  			want:    `{}`,
    72  			wantErr: false,
    73  		},
    74  		{
    75  			name:    "emptyslice",
    76  			js:      ``,
    77  			wantErr: true,
    78  		},
    79  		{
    80  			name: "types",
    81  			js: `{"controversiality":0,"body":"A look at Vietnam and Mexico exposes the myth of market liberalisation.","subreddit_id":"t5_6","link_id":"t3_17863","stickied":false,"subreddit":"reddit.com","score":2,"ups":2,"author_flair_css_class":null,"created_utc":1134365188,"author_flair_text":null,"author":"frjo","id":"c13","edited":false,"parent_id":"t3_17863","gilded":0,"distinguished":null,"retrieved_on":1473738411}
    82  {"created_utc":1134365725,"author_flair_css_class":null,"score":1,"ups":1,"subreddit":"reddit.com","stickied":false,"link_id":"t3_17866","subreddit_id":"t5_6","controversiality":0,"body":"The site states \"What can I use it for? Meeting notes, Reports, technical specs Sign-up sheets, proposals and much more...\", just like any other new breeed of sites that want us to store everything we have on the web. And they even guarantee multiple levels of security and encryption etc. But what prevents these web site operators fom accessing and/or stealing Meeting notes, Reports, technical specs Sign-up sheets, proposals and much more, for competitive or personal gains...? I am pretty sure that most of them are honest, but what's there to prevent me from setting up a good useful site and stealing all your data? Call me paranoid - I am.","retrieved_on":1473738411,"distinguished":null,"gilded":0,"id":"c14","edited":false,"parent_id":"t3_17866","author":"zse7zse","author_flair_text":null}`,
    83  			want: `{"controversiality":0,"body":"A look at Vietnam and Mexico exposes the myth of market liberalisation.","subreddit_id":"t5_6","link_id":"t3_17863","stickied":false,"subreddit":"reddit.com","score":2,"ups":2,"author_flair_css_class":null,"created_utc":1134365188,"author_flair_text":null,"author":"frjo","id":"c13","edited":false,"parent_id":"t3_17863","gilded":0,"distinguished":null,"retrieved_on":1473738411}
    84  {"created_utc":1134365725,"author_flair_css_class":null,"score":1,"ups":1,"subreddit":"reddit.com","stickied":false,"link_id":"t3_17866","subreddit_id":"t5_6","controversiality":0,"body":"The site states \"What can I use it for? Meeting notes, Reports, technical specs Sign-up sheets, proposals and much more...\", just like any other new breeed of sites that want us to store everything we have on the web. And they even guarantee multiple levels of security and encryption etc. But what prevents these web site operators fom accessing and/or stealing Meeting notes, Reports, technical specs Sign-up sheets, proposals and much more, for competitive or personal gains...? I am pretty sure that most of them are honest, but what's there to prevent me from setting up a good useful site and stealing all your data? Call me paranoid - I am.","retrieved_on":1473738411,"distinguished":null,"gilded":0,"id":"c14","edited":false,"parent_id":"t3_17866","author":"zse7zse","author_flair_text":null}`,
    85  		},
    86  	}
    87  	for _, tt := range tests {
    88  		t.Run(tt.name, func(t *testing.T) {
    89  			got, err := ParseND([]byte(tt.js), nil)
    90  			if (err != nil) != tt.wantErr {
    91  				t.Errorf("ParseND() error = %v, wantErr %v", err, tt.wantErr)
    92  				return
    93  			}
    94  			if tt.wantErr {
    95  				return
    96  			}
    97  			// Compare all
    98  			i := got.Iter()
    99  			b2, err := i.MarshalJSON()
   100  			if string(b2) != tt.want {
   101  				t.Errorf("ParseND() got = %v\nwant = %v", string(b2), tt.want)
   102  			}
   103  
   104  			// Compare each element
   105  			i = got.Iter()
   106  			ref := strings.Split(tt.js, "\n")
   107  			for i.Advance() == TypeRoot {
   108  				_, obj, err := i.Root(nil)
   109  				if err != nil {
   110  					t.Fatal(err)
   111  				}
   112  				want := ref[0]
   113  				ref = ref[1:]
   114  				got, err := obj.MarshalJSON()
   115  				if err != nil {
   116  					t.Fatal(err)
   117  				}
   118  				if string(got) != want {
   119  					t.Errorf("ParseND() got = %v\nwant = %v", string(got), want)
   120  				}
   121  			}
   122  
   123  			i = got.Iter()
   124  			ref = strings.Split(tt.js, "\n")
   125  			for i.Advance() == TypeRoot {
   126  				typ, obj, err := i.Root(nil)
   127  				if err != nil {
   128  					t.Fatal(err)
   129  				}
   130  				switch typ {
   131  				case TypeObject:
   132  					// We must send it throught marshall/unmarshall to match.
   133  					var want = ref[0]
   134  					var tmpMap map[string]interface{}
   135  					err := json.Unmarshal([]byte(want), &tmpMap)
   136  					if err != nil {
   137  						t.Fatal(err)
   138  					}
   139  					w2, err := json.Marshal(tmpMap)
   140  					if err != nil {
   141  						t.Fatal(err)
   142  					}
   143  					want = string(w2)
   144  					got, err := obj.Interface()
   145  					if err != nil {
   146  						t.Fatal(err)
   147  					}
   148  					gotAsJson, err := json.Marshal(got)
   149  					if err != nil {
   150  						t.Fatal(err)
   151  					}
   152  					if !reflect.DeepEqual(string(gotAsJson), want) {
   153  						t.Errorf("ParseND() got = %#v, want %#v", string(gotAsJson), want)
   154  					}
   155  				}
   156  				ref = ref[1:]
   157  			}
   158  		})
   159  	}
   160  }
   161  
   162  func TestParseFailCases(t *testing.T) {
   163  	if !SupportedCPU() {
   164  		t.SkipNow()
   165  	}
   166  
   167  	tests := []struct {
   168  		name    string
   169  		js      string
   170  		want    string
   171  		wantErr bool
   172  	}{
   173  		{
   174  			name:    "fail01_EXCLUDE",
   175  			js:      `"A JSON payload should be an object or array, not a string."`,
   176  			wantErr: true,
   177  		},
   178  		{
   179  			name:    "fail02",
   180  			js:      `["Unclosed array"`,
   181  			wantErr: true,
   182  		},
   183  		{
   184  			name:    "fail03",
   185  			js:      `{unquoted_key: "keys must be quoted"}`,
   186  			wantErr: true,
   187  		},
   188  		{
   189  			name:    "fail04",
   190  			js:      `["extra comma",]`,
   191  			wantErr: true,
   192  		},
   193  		{
   194  			name:    "fail05",
   195  			js:      `["double extra comma",,]`,
   196  			wantErr: true,
   197  		},
   198  		{
   199  			name:    "fail06",
   200  			js:      `[   , "<-- missing value"]`,
   201  			wantErr: true,
   202  		},
   203  		{
   204  			name:    "fail07",
   205  			js:      `["Comma after the close"],`,
   206  			wantErr: true,
   207  		},
   208  		{
   209  			name:    "fail08",
   210  			js:      `["Extra close"]]`,
   211  			wantErr: true,
   212  		},
   213  		{
   214  			name:    "fail09",
   215  			js:      `{"Extra comma": true,}`,
   216  			wantErr: true,
   217  		},
   218  		{
   219  			name:    "fail10",
   220  			js:      `{"Extra value after close": true} "misplaced quoted value"`,
   221  			wantErr: true,
   222  		},
   223  		{
   224  			name:    "fail11",
   225  			js:      `{"Illegal expression": 1 + 2}`,
   226  			wantErr: true,
   227  		},
   228  		{
   229  			name:    "fail12",
   230  			js:      `{"Illegal invocation": alert()}`,
   231  			wantErr: true,
   232  		},
   233  		{
   234  			name:    "fail13",
   235  			js:      `{"Numbers cannot have leading zeroes": 013}`,
   236  			wantErr: true,
   237  		},
   238  		{
   239  			name:    "fail14",
   240  			js:      `{"Numbers cannot be hex": 0x14}`,
   241  			wantErr: true,
   242  		},
   243  		{
   244  			name:    "fail15",
   245  			js:      `["Illegal backslash escape: ` + string(byte(0x15)) + `"]`,
   246  			wantErr: true,
   247  		},
   248  		{
   249  			name:    "fail16",
   250  			js:      `[\naked]`,
   251  			wantErr: true,
   252  		},
   253  		{
   254  			name:    "fail17",
   255  			js:      `["Illegal backslash escape: ` + string(byte(0x17)) + `"]`,
   256  			wantErr: true,
   257  		},
   258  		{
   259  			name:    "fail19",
   260  			js:      `{"Missing colon" null}`,
   261  			wantErr: true,
   262  		},
   263  		{
   264  			name:    "fail20",
   265  			js:      `{"Double colon":: null}`,
   266  			wantErr: true,
   267  		},
   268  		{
   269  			name:    "fail21",
   270  			js:      `{"Comma instead of colon", null}`,
   271  			wantErr: true,
   272  		},
   273  		{
   274  			name:    "fail22",
   275  			js:      `["Colon instead of comma": false]`,
   276  			wantErr: true,
   277  		},
   278  		{
   279  			name:    "fail23",
   280  			js:      `["Bad value", truth]`,
   281  			wantErr: true,
   282  		},
   283  		{
   284  			name:    "fail24",
   285  			js:      `['single quote']`,
   286  			wantErr: true,
   287  		},
   288  		{
   289  			name:    "fail25",
   290  			js:      `["	tab	character	in	string	"]`,
   291  			wantErr: true,
   292  		},
   293  		// fail26 is disabled for simdjson-go (not leading to errors, C specific escaping)
   294  		//{
   295  		//	name:    "fail26",
   296  		//	js:      `["tab\   character\   in\  string\  "]`,
   297  		//	wantErr: true,
   298  		//},
   299  		{
   300  			name: "fail27",
   301  			js: `["line
   302  break"]`,
   303  			wantErr: true,
   304  		},
   305  		{
   306  			name: "fail28",
   307  			js: `["line\
   308  break"]`,
   309  			wantErr: true,
   310  		},
   311  		{
   312  			name:    "fail29",
   313  			js:      `[0e]`,
   314  			wantErr: true,
   315  		},
   316  		{
   317  			name:    "fail30",
   318  			js:      `[0e+]`,
   319  			wantErr: true,
   320  		},
   321  		{
   322  			name:    "fail31",
   323  			js:      `[0e+-1]`,
   324  			wantErr: true,
   325  		},
   326  		{
   327  			name:    "fail32",
   328  			js:      `{"Comma instead if closing brace": true,`,
   329  			wantErr: true,
   330  		},
   331  		{
   332  			name:    "fail33",
   333  			js:      `["mismatch"}`,
   334  			wantErr: true,
   335  		},
   336  		{
   337  			name:    "fail35",
   338  			js:      `{"this file" :` + string(byte(0xa0)) + `"has an unbreakable character outside the strings"}`,
   339  			wantErr: true,
   340  		},
   341  		{
   342  			name:    "fail36",
   343  			js:      `["this is an unclosed string ]`,
   344  			wantErr: true,
   345  		},
   346  		{
   347  			name:    "fail37",
   348  			js:      `[12a]`,
   349  			wantErr: true,
   350  		},
   351  		{
   352  			name:    "fail38",
   353  			js:      `[12 a]`,
   354  			wantErr: true,
   355  		},
   356  		{
   357  			name:    "fail39_EXCLUDE",
   358  			js:      `{"name":1,"name":2, "this is allowable as per the json spec": true}`,
   359  			want:    `{"name":1,"name":2,"this is allowable as per the json spec":true}`,
   360  			wantErr: false,
   361  		},
   362  		{
   363  			name:    "fail41_toolarge",
   364  			js:      `18446744073709551616`,
   365  			wantErr: true,
   366  		},
   367  		{
   368  			name: "fail42",
   369  			js: `{"fdfds":
   370  "4332" }`,
   371  			wantErr: true,
   372  		},
   373  		{
   374  			name:    "fail43",
   375  			js:      `[-]`,
   376  			wantErr: true,
   377  		},
   378  		{
   379  			name:    "fail44",
   380  			js:      `[-2.]`,
   381  			wantErr: true,
   382  		},
   383  		{
   384  			name:    "fail45",
   385  			js:      `[0.e1]`,
   386  			wantErr: true,
   387  		},
   388  		{
   389  			name:    "fail46",
   390  			js:      `[2.e+3]`,
   391  			wantErr: true,
   392  		},
   393  		{
   394  			name:    "fail47",
   395  			js:      `[2.e-3]`,
   396  			wantErr: true,
   397  		},
   398  		{
   399  			name:    "fail48",
   400  			js:      `[2.e3]`,
   401  			wantErr: true,
   402  		},
   403  		{
   404  			name:    "fail49",
   405  			js:      `[-.123]`,
   406  			wantErr: true,
   407  		},
   408  		{
   409  			name:    "fail50",
   410  			js:      `[1.]`,
   411  			wantErr: true,
   412  		},
   413  		{
   414  			name:    "fail51",
   415  			js:      `[],`,
   416  			wantErr: true,
   417  		},
   418  		{
   419  			name:    "fail52",
   420  			js:      `[x]]`,
   421  			wantErr: true,
   422  		},
   423  		{
   424  			name:    "fail53",
   425  			js:      `{}}`,
   426  			wantErr: true,
   427  		},
   428  		{
   429  			name:    "fail54",
   430  			js:      `[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[(...)`,
   431  			wantErr: true,
   432  		},
   433  		{
   434  			name:    "fail55",
   435  			js:      `[1,]`,
   436  			wantErr: true,
   437  		},
   438  		{
   439  			name:    "fail56",
   440  			js:      `["",]`,
   441  			wantErr: true,
   442  		},
   443  		// fail57 through to fail59 and fail61 are disabled for simdjson-go as Go does not allow illegal unicode chars
   444  		// { name: "fail57", js: `{ "name": "\udc00\ud800\uggggxy" }`, wantErr: true },
   445  		// { name: "fail58", js: `{ "name": "\uc0meatmebro" }`, wantErr: true },
   446  		// { name: "fail59", js: `{ "name": "\uf**k" }`, wantErr: true },
   447  		// { name: "fail61", js: `{"badescape":"\uxhgj"}`, wantErr: true },
   448  		{
   449  			name:    "fail60",
   450  			js:      `[1e+1111]`,
   451  			wantErr: true,
   452  		},
   453  		{
   454  			name:    "fail62",
   455  			js:      `{"foo":"baa}`,
   456  			wantErr: true,
   457  		},
   458  		{
   459  			name:    "fail63",
   460  			js:      `"f[`,
   461  			wantErr: true,
   462  		},
   463  		{
   464  			name:    "fail64",
   465  			js:      `"`,
   466  			wantErr: true,
   467  		},
   468  		{
   469  			name:    "fail65",
   470  			js:      `falsy`,
   471  			wantErr: true,
   472  		},
   473  		{
   474  			name:    "fail66",
   475  			js:      `44`,
   476  			wantErr: true,
   477  		},
   478  		{
   479  			name:    "fail67",
   480  			js:      `4 4`,
   481  			wantErr: true,
   482  		},
   483  		{
   484  			name:    "fail68",
   485  			js:      `04`,
   486  			wantErr: true,
   487  		},
   488  		{
   489  			name:    "fail69",
   490  			js:      `falsefalse`,
   491  			wantErr: true,
   492  		},
   493  		{
   494  			name:    "fail70",
   495  			js:      ``,
   496  			wantErr: true,
   497  		},
   498  		{
   499  			name:    "fail71",
   500  			js:      `"a bad string��"`,
   501  			wantErr: true,
   502  		},
   503  		{
   504  			name:    "fail73",
   505  			js:      `10000000000000000000000000000000000000000000e+308`,
   506  			wantErr: true,
   507  		},
   508  		{
   509  			name:    "fail74",
   510  			js:      `[7,7,7,7,6,7,7,7,6,7,7,6,[7,7,7,7,6,7,7,7,6,7,7,6,7,7,7,7,7,7,6`,
   511  			wantErr: true,
   512  		},
   513  		{
   514  			name:    "fail75",
   515  			js:      `f`,
   516  			wantErr: true,
   517  		},
   518  		{
   519  			name:    "noclose",
   520  			js:      `{"bimbam:"something"`,
   521  			wantErr: true,
   522  		},
   523  		{
   524  			name:    "noclose-issue-13",
   525  			js:      `{"000"`,
   526  			wantErr: true,
   527  		},
   528  		{
   529  			name:    "noclose-issue-23",
   530  			js:      `{""0`,
   531  			wantErr: true,
   532  		},
   533  		{
   534  			name:    "issue-17",
   535  			js:      `{"bimbam:12345465.44j7,"bumbum":true}`,
   536  			wantErr: true,
   537  		},
   538  		{
   539  			name: "nonewlineinkeys-issue-27",
   540  			js: `{"
   541  ":"","00":""}`,
   542  			wantErr: true,
   543  		},
   544  		{
   545  			name:    "noclose-issue-19",
   546  			js:      `[0.0`,
   547  			wantErr: true,
   548  		},
   549  		{
   550  			name:    "binaryinput-issue-20",
   551  			js:      string([]byte{0x09, 0x20, 0x20, 0x0a}),
   552  			wantErr: true,
   553  		},
   554  		//{
   555  		//	name:    "invalidjson-issue-24",
   556  		//	js:      "{\"\":[],\"\":[5\x00]}",
   557  		//	want:    "{\"\":[],\"\":[5\x00]}",
   558  		//	wantErr: false,
   559  		//},
   560  		//{
   561  		//	name:    "invalidchar-issue-25",
   562  		//	js:      `{"":"\_000"}`,
   563  		//	wantErr: true,
   564  		//},
   565  		{
   566  			name:    "fatal-error-issue-32",
   567  			js:      `{"":`,
   568  			wantErr: true,
   569  		},
   570  		{
   571  			name:    "index-out-of-range-issue-28",
   572  			js:      `[6`,
   573  			wantErr: true,
   574  		},
   575  		{
   576  			name:    "deadlock-issue-29",
   577  			js:      `{""`,
   578  			wantErr: true,
   579  		},
   580  		{
   581  			name:    "written-beyond-slice-capacity-issue-33",
   582  			js:      `{"":"\u20A"}`,
   583  			wantErr: true,
   584  		},
   585  		{
   586  			name:    "not-written-beyond-slice-capacity-issue-33",
   587  			js:      `{"":"\u20AC"}`,
   588  			want:    `{"":"€"}`,
   589  			wantErr: false,
   590  		},
   591  		{
   592  			name: "unexpected-fault-address-issue-31",
   593  			js: `{"": {
   594    "": [   
   595      {
   596        "": "",
   597        "\ud"00\uDc00`,
   598  			wantErr: true,
   599  		},
   600  		{
   601  			name: "index-out-of-range-issue-39",
   602  			js: `{"": null,
   603      "c": false,"obj2": {
   604          "d": "c", "g": 
   605              [
   606                  "123 456-7890", null         ] },
   607          "a": [],
   608          "c": { "d": [[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[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[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[`,
   615  			wantErr: true,
   616  		},
   617  		{
   618  			name:    "index-out-of-range-issue-42",
   619  			js:      string([]byte{0x00}) + `[[[[],-0,2],9],0,[],[],0,1,0,0,[2],0,0,0,[],-0,0,0,0,2,0,[],[],1,[[0,0,[[],-0,2],9],0,[],[],0,2],0,0,0,0,0,[2],0,0,0,[],-0,0,0,0,0,[],[],1,[0,[2],0,[],[],0,9],0,[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[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[`,
   625  			wantErr: true,
   626  		},
   627  		{
   628  			name:    "invalid-json-not-detected-issue-24",
   629  			js:      `"{\"\":[],\"\":[5\x00]}"`,
   630  			wantErr: true,
   631  		},
   632  		{
   633  			name:    "missing-invalid-character-issue-25",
   634  			js:      `{"":"\_000"}`,
   635  			wantErr: true,
   636  		},
   637  	}
   638  
   639  	for _, tt := range tests {
   640  		t.Run(tt.name, func(t *testing.T) {
   641  			got, err := Parse([]byte(tt.js), nil)
   642  			if (err != nil) != tt.wantErr {
   643  				t.Errorf("ParseFailCases() error = %v, wantErr %v", err, tt.wantErr)
   644  				return
   645  			}
   646  			if tt.wantErr {
   647  				return
   648  			}
   649  			// Compare all
   650  			i := got.Iter()
   651  			b2, err := i.MarshalJSON()
   652  			if string(b2) != tt.want {
   653  				t.Errorf("ParseFailCases() got = %v, want %v", string(b2), tt.want)
   654  			}
   655  
   656  			i = got.Iter()
   657  			ref := []string{tt.js}
   658  			for i.Advance() == TypeRoot {
   659  				typ, obj, err := i.Root(nil)
   660  				if err != nil {
   661  					t.Fatal(err)
   662  				}
   663  				switch typ {
   664  				case TypeObject:
   665  					// We must send it throught marshall/unmarshall to match.
   666  					var want = ref[0]
   667  					var tmpMap map[string]interface{}
   668  					err := json.Unmarshal([]byte(want), &tmpMap)
   669  					if err != nil {
   670  						t.Fatal(err)
   671  					}
   672  					w2, err := json.Marshal(tmpMap)
   673  					if err != nil {
   674  						t.Fatal(err)
   675  					}
   676  					want = string(w2)
   677  					got, err := obj.Interface()
   678  					if err != nil {
   679  						t.Fatal(err)
   680  					}
   681  					gotAsJson, err := json.Marshal(got)
   682  					if err != nil {
   683  						t.Fatal(err)
   684  					}
   685  					if !reflect.DeepEqual(string(gotAsJson), want) {
   686  						t.Errorf("ParseFailCases() got = %#v, want %#v", string(gotAsJson), want)
   687  					}
   688  				}
   689  				ref = ref[1:]
   690  			}
   691  		})
   692  	}
   693  }
   694  
   695  func TestParsePassCases(t *testing.T) {
   696  	if !SupportedCPU() {
   697  		t.SkipNow()
   698  	}
   699  
   700  	tests := []struct {
   701  		name        string
   702  		skipFloats  bool // Skip tests that contain float64 inprecisions (see GOLANG_NUMBER_PARSING flag)
   703  		onlyPrecise bool
   704  		js          string
   705  		want        string
   706  		wantErr     bool
   707  	}{
   708  		{
   709  			name:    "segfault",
   710  			js:      `{"F":"5\n\n\n\n\n\n\n\n\n11102230246251565404236316680908203125\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"}`,
   711  			wantErr: false,
   712  			want:    `{"F":"5\n\n\n\n\n\n\n\n\n11102230246251565404236316680908203125\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"}`,
   713  		},
   714  		{
   715  			name: "pass01.json", skipFloats: true,
   716  			js: `{"a":[
   717      "JSON Test Pattern pass1",
   718      {"object with 1 member":["array with 1 element"]},
   719      {},
   720      [],
   721      -42,
   722      true,
   723      false,
   724      null,
   725      {
   726          "integer": 1234567890,
   727          "real": -9876.543210,
   728          "e": 0.123456789e-12,
   729          "E": 1.234567890E+34,
   730          "":  23456789012E66,
   731          "zero": 0,
   732          "one": 1,
   733          "space": " ",
   734          "quote": "\"",
   735          "backslash": "\\",
   736          "controls": "\b\f\n\r\t",
   737          "slash": "/ & \/",
   738          "alpha": "abcdefghijklmnopqrstuvwyz",
   739          "ALPHA": "ABCDEFGHIJKLMNOPQRSTUVWYZ",
   740          "digit": "0123456789",
   741          "0123456789": "digit",
   742          "special": "1~!@#$%^&*()_+-={':[,]}|;.</>?",
   743  			"hex": "\u0123\u4567\u89AB\uCDEF\uabcd\uef4A",
   744  			"true": true,
   745  			"false": false,
   746  			"null": null,
   747  			"array":[  ],
   748  			"object":{  },
   749  			"address": "50 St. James Street",
   750  			"url": "http://www.JSON.org/",
   751  			"comment": "// /* <!-- --",
   752  			"# -- --> */": " ",
   753  			" s p a c e d " :[1,2 , 3
   754  
   755  			,
   756  
   757  			4 , 5        ,          6           ,7        ],"compact":[1,2,3,4,5,6,7],
   758  			"jsontext": "{\"object with 1 member\":[\"array with 1 element\"]}",
   759  			"quotes": "&#34; \u0022 %22 0x22 034 &#x22;",
   760  			"\/\\\"\uCAFE\uBABE\uAB98\uFCDE\ubcda\uef4A\b\f\n\r\t1~!@#$%^&*()_+-=[]{}|;:',./<>?"
   761  			: "A key can be any string"
   762  		},
   763  		0.5 ,98.6
   764  		,
   765  		99.44
   766  		,
   767  
   768  		1066,
   769  		1e1,
   770  		0.1e1,
   771  		1e-1,
   772  		1e00,2e+00,2e-00
   773  		,"rosebud"]}`,
   774  			want:    `{"a":["JSON Test Pattern pass1",{"object with 1 member":["array with 1 element"]},{},[],-42,true,false,null,{"integer":1234567890,"real":-9876.54321,"e":1.23456789e-13,"E":1.23456789e+34,"":2.3456789012e+76,"zero":0,"one":1,"space":" ","quote":"\"","backslash":"\\","controls":"\b\f\n\r\t","slash":"/ & /","alpha":"abcdefghijklmnopqrstuvwyz","ALPHA":"ABCDEFGHIJKLMNOPQRSTUVWYZ","digit":"0123456789","0123456789":"digit","special":"1~!@#$%^&*()_+-={':[,]}|;.</>?","hex":"ģ䕧覫췯ꯍ","true":true,"false":false,"null":null,"array":[],"object":{},"address":"50 St. James Street","url":"http://www.JSON.org/","comment":"// /* <!-- --","# -- --> */":" "," s p a c e d ":[1,2,3,4,5,6,7],"compact":[1,2,3,4,5,6,7],"jsontext":"{\"object with 1 member\":[\"array with 1 element\"]}","quotes":"&#34; \" %22 0x22 034 &#x22;","/\\\"쫾몾ꮘﳞ볚\b\f\n\r\t1~!@#$%^&*()_+-=[]{}|;:',./<>?":"A key can be any string"},0.5,98.6,99.44,1066,10,1,0.1,1,2,2,"rosebud"]}`,
   775  			wantErr: false,
   776  		},
   777  		{
   778  			name:    "pass02.json",
   779  			js:      `{"a":[[[[[[[[[[[[[[[[[[["Not too deep"]]]]]]]]]]]]]]]]]]]}`,
   780  			want:    `{"a":[[[[[[[[[[[[[[[[[[["Not too deep"]]]]]]]]]]]]]]]]]]]}`,
   781  			wantErr: false,
   782  		},
   783  		{
   784  			name: "pass03.json",
   785  			js: `{
   786      "JSON Test Pattern pass3": {
   787          "The outermost value": "must be an object or array.",
   788          "In this test": "It is an object."
   789      }
   790  }`,
   791  			want:    `{"JSON Test Pattern pass3":{"The outermost value":"must be an object or array.","In this test":"It is an object."}}`,
   792  			wantErr: false,
   793  		},
   794  		{
   795  			name: "pass04.json", skipFloats: true,
   796  			js:      `{"a":[3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679,0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003]}`,
   797  			want:    `{"a":[3.141592653589793,3e-117]}`,
   798  			wantErr: false,
   799  		},
   800  		//{
   801  		//	name: "pass05.json",
   802  		//	js: `12345678900000002170460276904689664.000000`,
   803  		//	wantErr: false,
   804  		//},
   805  		//{
   806  		//	name: "pass06.json",
   807  		//	js: `true`,
   808  		//	wantErr: false,
   809  		//},
   810  		//{
   811  		//	name: "pass07.json",
   812  		//	js: `null`,
   813  		//	wantErr: false,
   814  		//},
   815  		//{
   816  		//	name: "pass08.json",
   817  		//	js: `1`,
   818  		//	wantErr: false,
   819  		//},
   820  		//{
   821  		//	name: "pass09.json",
   822  		//	js: `false`,
   823  		//	wantErr: false,
   824  		//},
   825  		//{
   826  		//	name: "pass10.json",
   827  		//	js: `"124"`,
   828  		//	wantErr: false,
   829  		//},
   830  		//{
   831  		//	name: "pass11.json",
   832  		//	js: `4611686018427387904`,
   833  		//	wantErr: false,
   834  		//},
   835  		//{
   836  		//	name: "pass12.json",
   837  		//	js: `2147483648`,
   838  		//	wantErr: false,
   839  		//},
   840  		//{
   841  		//	name: "pass13.json",
   842  		//	js: `12300`,
   843  		//	wantErr: false,
   844  		//},
   845  		{
   846  			name:    "pass14.json",
   847  			js:      `{"string with backandquote \\\"":1, "string with back\\":2}`,
   848  			want:    `{"string with backandquote \\\"":1,"string with back\\":2}`,
   849  			wantErr: false,
   850  		},
   851  		{
   852  			name: "pass15.json", skipFloats: true,
   853  			js:      `{"a":[-65.619720000000029]}`,
   854  			want:    `{"a":[-65.61972000000003]}`,
   855  			wantErr: false,
   856  		},
   857  		//{
   858  		//	name: "pass16.json",
   859  		//	js: `0`,
   860  		//	wantErr: false,
   861  		//},
   862  		{
   863  			name:    "pass17.json",
   864  			js:      `{"a":[1.0e-307,0.1e-307,0.01e-306,1.79769e+308,-1.79769e+308]}`,
   865  			want:    `{"a":[1e-307,1e-308,1e-308,1.79769e+308,-1.79769e+308]}`,
   866  			wantErr: false,
   867  		},
   868  		{
   869  			name: "pass18.json", skipFloats: true,
   870  			js:      `{"a":[1000000000000000000e0,1000000000000000000e-0,1000000000000000000.0e0,1000000000000000000e10,"issue187"]}`,
   871  			want:    `{"a":[1000000000000000000,1000000000000000000,1000000000000000000,1e+28,"issue187"]}`,
   872  			wantErr: false,
   873  		},
   874  		//{
   875  		//	name: "pass19.json",
   876  		//	js: `-1`,
   877  		//	wantErr: false,
   878  		//},
   879  		//{
   880  		//	name: "pass20.json",
   881  		//	js: `1.2e000000010`,
   882  		//	wantErr: false,
   883  		//},
   884  		//{
   885  		//	name: "pass21.json",
   886  		//	js: `9223372036854775808`,
   887  		//	wantErr: false,
   888  		//},
   889  		//{
   890  		//	name: "pass22.json",
   891  		//	js: `18446744073709551615`,
   892  		//	wantErr: false,
   893  		//},
   894  		//{
   895  		//	name: "pass23.json",
   896  		//	js: `-5.96916642387374e-309`,
   897  		//	wantErr: false,
   898  		//},
   899  		//{
   900  		//	name: "pass24.json",
   901  		//	js: `-7.9431`,
   902  		//	wantErr: false,
   903  		//},
   904  		//{
   905  		//	name: "pass25.json",
   906  		//	js: `4E-2147483674`,
   907  		//	wantErr: false,
   908  		//},
   909  		{
   910  			name:    "small-nested-issue-51",
   911  			js:      `{"M":{"T":false}}`,
   912  			want:    `{"M":{"T":false}}`,
   913  			wantErr: false,
   914  		},
   915  		{
   916  			name:        "big-float-inprecision-46",
   917  			onlyPrecise: true,
   918  			js:          `{"":60000000000000000000}`,
   919  			want:        `{"":60000000000000000000}`,
   920  			wantErr:     false,
   921  		},
   922  		{
   923  			name:        "big-integer-overflow-47",
   924  			onlyPrecise: true,
   925  			js:          `{"o":30886023086020860230}`,
   926  			want:        `{"o":30886023086020860000}`,
   927  			wantErr:     false,
   928  		},
   929  		{
   930  			name:        "small-number-array-issue-49",
   931  			onlyPrecise: true,
   932  			js:          `{"G":[0,5e-500,5e-50]}`,
   933  			want:        `{"G":[0,0,5e-50]}`,
   934  			wantErr:     false,
   935  		},
   936  		{
   937  			name:    "fail18", // Not too deep for simdjson-go
   938  			js:      `[[[[[[[[[[[[[[[[[[[["Too deep"]]]]]]]]]]]]]]]]]]]]`,
   939  			want:    `[[[[[[[[[[[[[[[[[[[["Too deep"]]]]]]]]]]]]]]]]]]]]`,
   940  			wantErr: false,
   941  		},
   942  		//{
   943  		//	name: "fail34",
   944  		//	// `["this string contains bad UTF-8 €"]`
   945  		//	js:      string([]byte{0x5b, 0x22, 0x74, 0x68, 0x69, 0x73, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x20, 0x62, 0x61, 0x64, 0x20, 0x55, 0x54, 0x46, 0x2d, 0x38, 0x20, 0x80, 0x22, 0x5d, 0x0a}),
   946  		//	want: `["this string contains bad UTF-8 �"]`,
   947  		//	wantErr: false,
   948  		//},
   949  		{
   950  			name:    "fail72",
   951  			js:      `["with bad trailing space" ]`,
   952  			want:    `["with bad trailing space"]`,
   953  			wantErr: false,
   954  		},
   955  	}
   956  
   957  	var got *ParsedJson
   958  
   959  	for _, tt := range tests {
   960  		t.Run(tt.name, func(t *testing.T) {
   961  			if tt.skipFloats {
   962  				return
   963  			}
   964  			var err error
   965  			got, err = Parse([]byte(tt.js), got)
   966  			if (err != nil) != tt.wantErr {
   967  				t.Errorf("TestParsePassCases() error = %v, wantErr %v", err, tt.wantErr)
   968  				return
   969  			}
   970  			if tt.wantErr {
   971  				return
   972  			}
   973  			// Compare all
   974  			i := got.Iter()
   975  			b2, err := i.MarshalJSON()
   976  			if string(b2) != tt.want {
   977  				t.Errorf("TestParsePassCases() got = %v, want %v", string(b2), tt.want)
   978  			}
   979  
   980  			i = got.Iter()
   981  			ref := []string{tt.js}
   982  			for i.Advance() == TypeRoot {
   983  				typ, obj, err := i.Root(nil)
   984  				if err != nil {
   985  					t.Fatal(err)
   986  				}
   987  				switch typ {
   988  				case TypeObject:
   989  					// We must send it through marshall/unmarshal to match.
   990  					var want = ref[0]
   991  					var tmpMap map[string]interface{}
   992  					err := json.Unmarshal([]byte(want), &tmpMap)
   993  					if err != nil {
   994  						t.Fatal(err)
   995  					}
   996  					w2, err := json.Marshal(tmpMap)
   997  					if err != nil {
   998  						t.Fatal(err)
   999  					}
  1000  					want = string(w2)
  1001  					got, err := obj.Interface()
  1002  					if err != nil {
  1003  						t.Fatal(err)
  1004  					}
  1005  					gotAsJson, err := json.Marshal(got)
  1006  					if err != nil {
  1007  						t.Fatal(err)
  1008  					}
  1009  					if !reflect.DeepEqual(string(gotAsJson), want) {
  1010  						t.Errorf("TestParsePassCases() got = %#v, want %#v", string(gotAsJson), want)
  1011  					}
  1012  				}
  1013  				ref = ref[1:]
  1014  			}
  1015  		})
  1016  	}
  1017  }