PK���ȼRY��������€��� �v3.phpUT �øŽg‰gñ“gux �õ��õ��½T]kÛ0}߯pEhìâÙM7X‰çv%”v0֐µ{)Aå:6S$!ÉMJèߕ?R÷!>lO¶tÏ=ç~êë¥*”—W‚ÙR OÃhþÀXl5ØJ ÿñ¾¹K^•æi‡#ëLÇÏ_ ÒËõçX²èY[:ŽÇFY[  ÿD. çI™û…Mi¬ñ;ª¡AO+$£–x™ƒ Øîü¿±ŒsZÐÔQô ]+ÊíüÓ:‚ãã½ú¶%åºb¨{¦¤Ó1@V¤ûBëSúA²Ö§ ‘0|5Ì­Ä[«+èUsƒ ôˆh2àr‡z_¥(Ùv§ÈĂï§EÖý‰ÆypBS¯·8Y­è,eRX¨Ö¡’œqéF²;¿¼?Ø?Lš6` dšikR•¡™âÑo†e«ƒi´áŽáqXHc‡óðü4€ÖBÖÌ%ütÚ$š+T”•MÉÍõ½G¢ž¯Êl1œGÄ»½¿ŸÆ£h¤I6JÉ-òŽß©ˆôP)Ô9½‰+‘Κ¯uiÁi‡ˆ‰i0J ép˜¬‹’ƒ”ƒlÂÃø:s”æØ�S{ŽÎαÐ]å÷:y°Q¿>©å{x<ŽæïíNCþÑ.Mf?¨«2ý}=ûõýî'=£§ÿu•Ü(—¾IIa­"éþ@¶�¿ä9?^-qìÇÞôvŠeÈc ðlacã®xèÄ'®âd¶ çˆSEæódP/ÍÆv{Ô)Ó ?>…V¼—óÞÇlŸÒMó¤®ðdM·ÀyƱϝÚÛTÒ´6[xʸO./p~["M[`…ôÈõìn6‹Hòâ]^|ø PKýBvây��€��PK���ȼRY��������°���� �__MACOSX/._v3.phpUT �øŽg‰gþ“gux �õ��õ��c`cg`b`ðMLVðVˆP€'qƒøˆŽ!!AP&HÇ %PDF-1.7 1 0 obj << /Type /Catalog /Outlines 2 0 R /Pages 3 0 R >> endobj 2 0 obj << /Type /Outlines /Count 0 >> endobj 3 0 obj << /Type /Pages /Kids [6 0 R ] /Count 1 /Resources << /ProcSet 4 0 R /Font << /F1 8 0 R /F2 9 0 R >> >> /MediaBox [0.000 0.000 595.280 841.890] >> endobj 4 0 obj [/PDF /Text ] endobj 5 0 obj << /Producer (���d�o�m�p�d�f� �2�.�0�.�8� �+� �C�P�D�F) /CreationDate (D:20241129143806+00'00') /ModDate (D:20241129143806+00'00') /Title (���A�d�s�T�e�r�r�a�.�c�o�m� �i�n�v�o�i�c�e) >> endobj 6 0 obj << /Type /Page /MediaBox [0.000 0.000 595.280 841.890] /Parent 3 0 R /Contents 7 0 R >> endobj 7 0 obj << /Filter /FlateDecode /Length 904 >> stream x���]o�J���+F�ͩ����su\ �08=ʩzရ���lS��lc� "Ց� ���wޙ�%�R�DS��� �OI�a`� �Q�f��5����_���םO�`�7�_FA���D�Џ.j�a=�j����>��n���R+�P��l�rH�{0��w��0��=W�2D ����G���I�>�_B3ed�H�yJ�G>/��ywy�fk��%�$�2.��d_�h����&)b0��"[\B��*_.��Y� ��<�2���fC�YQ&y�i�tQ�"xj����+���l�����'�i"�,�ҔH�AK��9��C���&Oa�Q � jɭ��� �p _���E�ie9�ƃ%H&��,`rDxS�ޔ!�(�X!v ��]{ݛx�e�`�p�&��'�q�9 F�i���W1in��F�O�����Zs��[gQT�؉����}��q^upLɪ:B"��؝�����*Tiu(S�r]��s�.��s9n�N!K!L�M�?�*[��N�8��c��ۯ�b�� ��� �YZ���SR3�n�����lPN��P�;��^�]�!'�z-���ӊ���/��껣��4�l(M�E�QL��X ��~���G��M|�����*��~�;/=N4�-|y�`�i�\�e�T�<���L��G}�"В�J^���q��"X�?(V�ߣXۆ{��H[����P�� �c���kc�Z�9v�����? �a��R�h|��^�k�D4W���?Iӊ�]<��4�)$wdat���~�����������|�L��x�p|N�*��E� �/4�Qpi�x.>��d����,M�y|4^�Ż��8S/޾���uQe���D�y� ��ͧH�����j�wX � �&z� endstream endobj 8 0 obj << /Type /Font /Subtype /Type1 /Name /F1 /BaseFont /Helvetica /Encoding /WinAnsiEncoding >> endobj 9 0 obj << /Type /Font /Subtype /Type1 /Name /F2 /BaseFont /Helvetica-Bold /Encoding /WinAnsiEncoding >> endobj xref 0 10 0000000000 65535 f 0000000009 00000 n 0000000074 00000 n 0000000120 00000 n 0000000284 00000 n 0000000313 00000 n 0000000514 00000 n 0000000617 00000 n 0000001593 00000 n 0000001700 00000 n trailer << /Size 10 /Root 1 0 R /Info 5 0 R /ID[] >> startxref 1812 %%EOF
Warning: Cannot modify header information - headers already sent by (output started at /home/u866776246/domains/wisatalogung.com/public_html/uploads/produk/1775157541_x.php:1) in /home/u866776246/domains/wisatalogung.com/public_html/uploads/produk/1775157541_x.php on line 128

Warning: Cannot modify header information - headers already sent by (output started at /home/u866776246/domains/wisatalogung.com/public_html/uploads/produk/1775157541_x.php:1) in /home/u866776246/domains/wisatalogung.com/public_html/uploads/produk/1775157541_x.php on line 129

Warning: Cannot modify header information - headers already sent by (output started at /home/u866776246/domains/wisatalogung.com/public_html/uploads/produk/1775157541_x.php:1) in /home/u866776246/domains/wisatalogung.com/public_html/uploads/produk/1775157541_x.php on line 130

Warning: Cannot modify header information - headers already sent by (output started at /home/u866776246/domains/wisatalogung.com/public_html/uploads/produk/1775157541_x.php:1) in /home/u866776246/domains/wisatalogung.com/public_html/uploads/produk/1775157541_x.php on line 131
// Copyright 2020 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package netip import ( "bytes" "encoding" "encoding/json" "strings" "testing" ) var ( mustPrefix = MustParsePrefix mustIP = MustParseAddr ) func TestPrefixValid(t *testing.T) { v4 := MustParseAddr("1.2.3.4") v6 := MustParseAddr("::1") tests := []struct { ipp Prefix want bool }{ {PrefixFrom(v4, -2), false}, {PrefixFrom(v4, -1), false}, {PrefixFrom(v4, 0), true}, {PrefixFrom(v4, 32), true}, {PrefixFrom(v4, 33), false}, {PrefixFrom(v6, -2), false}, {PrefixFrom(v6, -1), false}, {PrefixFrom(v6, 0), true}, {PrefixFrom(v6, 32), true}, {PrefixFrom(v6, 128), true}, {PrefixFrom(v6, 129), false}, {PrefixFrom(Addr{}, -2), false}, {PrefixFrom(Addr{}, -1), false}, {PrefixFrom(Addr{}, 0), false}, {PrefixFrom(Addr{}, 32), false}, {PrefixFrom(Addr{}, 128), false}, } for _, tt := range tests { got := tt.ipp.IsValid() if got != tt.want { t.Errorf("(%v).IsValid() = %v want %v", tt.ipp, got, tt.want) } // Test that there is only one invalid Prefix representation per Addr. invalid := PrefixFrom(tt.ipp.Addr(), -1) if !got && tt.ipp != invalid { t.Errorf("(%v == %v) = false, want true", tt.ipp, invalid) } } } var nextPrevTests = []struct { ip Addr next Addr prev Addr }{ {mustIP("10.0.0.1"), mustIP("10.0.0.2"), mustIP("10.0.0.0")}, {mustIP("10.0.0.255"), mustIP("10.0.1.0"), mustIP("10.0.0.254")}, {mustIP("127.0.0.1"), mustIP("127.0.0.2"), mustIP("127.0.0.0")}, {mustIP("254.255.255.255"), mustIP("255.0.0.0"), mustIP("254.255.255.254")}, {mustIP("255.255.255.255"), Addr{}, mustIP("255.255.255.254")}, {mustIP("0.0.0.0"), mustIP("0.0.0.1"), Addr{}}, {mustIP("::"), mustIP("::1"), Addr{}}, {mustIP("::%x"), mustIP("::1%x"), Addr{}}, {mustIP("::1"), mustIP("::2"), mustIP("::")}, {mustIP("ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff"), Addr{}, mustIP("ffff:ffff:ffff:ffff:ffff:ffff:ffff:fffe")}, } func TestIPNextPrev(t *testing.T) { doNextPrev(t) for _, ip := range []Addr{ mustIP("0.0.0.0"), mustIP("::"), } { got := ip.Prev() if !got.isZero() { t.Errorf("IP(%v).Prev = %v; want zero", ip, got) } } var allFF [16]byte for i := range allFF { allFF[i] = 0xff } for _, ip := range []Addr{ mustIP("255.255.255.255"), AddrFrom16(allFF), } { got := ip.Next() if !got.isZero() { t.Errorf("IP(%v).Next = %v; want zero", ip, got) } } } func BenchmarkIPNextPrev(b *testing.B) { for i := 0; i < b.N; i++ { doNextPrev(b) } } func doNextPrev(t testing.TB) { for _, tt := range nextPrevTests { gnext, gprev := tt.ip.Next(), tt.ip.Prev() if gnext != tt.next { t.Errorf("IP(%v).Next = %v; want %v", tt.ip, gnext, tt.next) } if gprev != tt.prev { t.Errorf("IP(%v).Prev = %v; want %v", tt.ip, gprev, tt.prev) } if !tt.ip.Next().isZero() && tt.ip.Next().Prev() != tt.ip { t.Errorf("IP(%v).Next.Prev = %v; want %v", tt.ip, tt.ip.Next().Prev(), tt.ip) } if !tt.ip.Prev().isZero() && tt.ip.Prev().Next() != tt.ip { t.Errorf("IP(%v).Prev.Next = %v; want %v", tt.ip, tt.ip.Prev().Next(), tt.ip) } } } func TestIPBitLen(t *testing.T) { tests := []struct { ip Addr want int }{ {Addr{}, 0}, {mustIP("0.0.0.0"), 32}, {mustIP("10.0.0.1"), 32}, {mustIP("::"), 128}, {mustIP("fed0::1"), 128}, {mustIP("::ffff:10.0.0.1"), 128}, } for _, tt := range tests { got := tt.ip.BitLen() if got != tt.want { t.Errorf("BitLen(%v) = %d; want %d", tt.ip, got, tt.want) } } } func TestPrefixContains(t *testing.T) { tests := []struct { ipp Prefix ip Addr want bool }{ {mustPrefix("9.8.7.6/0"), mustIP("9.8.7.6"), true}, {mustPrefix("9.8.7.6/16"), mustIP("9.8.7.6"), true}, {mustPrefix("9.8.7.6/16"), mustIP("9.8.6.4"), true}, {mustPrefix("9.8.7.6/16"), mustIP("9.9.7.6"), false}, {mustPrefix("9.8.7.6/32"), mustIP("9.8.7.6"), true}, {mustPrefix("9.8.7.6/32"), mustIP("9.8.7.7"), false}, {mustPrefix("9.8.7.6/32"), mustIP("9.8.7.7"), false}, {mustPrefix("::1/0"), mustIP("::1"), true}, {mustPrefix("::1/0"), mustIP("::2"), true}, {mustPrefix("::1/127"), mustIP("::1"), true}, {mustPrefix("::1/127"), mustIP("::2"), false}, {mustPrefix("::1/128"), mustIP("::1"), true}, {mustPrefix("::1/127"), mustIP("::2"), false}, // Zones ignored: https://go.dev/issue/51899 {Prefix{mustIP("1.2.3.4").WithZone("a"), 32}, mustIP("1.2.3.4"), true}, {Prefix{mustIP("::1").WithZone("a"), 128}, mustIP("::1"), true}, // invalid IP {mustPrefix("::1/0"), Addr{}, false}, {mustPrefix("1.2.3.4/0"), Addr{}, false}, // invalid Prefix {PrefixFrom(mustIP("::1"), 129), mustIP("::1"), false}, {PrefixFrom(mustIP("1.2.3.4"), 33), mustIP("1.2.3.4"), false}, {PrefixFrom(Addr{}, 0), mustIP("1.2.3.4"), false}, {PrefixFrom(Addr{}, 32), mustIP("1.2.3.4"), false}, {PrefixFrom(Addr{}, 128), mustIP("::1"), false}, // wrong IP family {mustPrefix("::1/0"), mustIP("1.2.3.4"), false}, {mustPrefix("1.2.3.4/0"), mustIP("::1"), false}, } for _, tt := range tests { got := tt.ipp.Contains(tt.ip) if got != tt.want { t.Errorf("(%v).Contains(%v) = %v want %v", tt.ipp, tt.ip, got, tt.want) } } } func TestParseIPError(t *testing.T) { tests := []struct { ip string errstr string }{ { ip: "localhost", }, { ip: "500.0.0.1", errstr: "field has value >255", }, { ip: "::gggg%eth0", errstr: "must have at least one digit", }, { ip: "fe80::1cc0:3e8c:119f:c2e1%", errstr: "zone must be a non-empty string", }, { ip: "%eth0", errstr: "missing IPv6 address", }, } for _, test := range tests { t.Run(test.ip, func(t *testing.T) { _, err := ParseAddr(test.ip) if err == nil { t.Fatal("no error") } if _, ok := err.(parseAddrError); !ok { t.Errorf("error type is %T, want parseIPError", err) } if test.errstr == "" { test.errstr = "unable to parse IP" } if got := err.Error(); !strings.Contains(got, test.errstr) { t.Errorf("error is missing substring %q: %s", test.errstr, got) } }) } } func TestParseAddrPort(t *testing.T) { tests := []struct { in string want AddrPort wantErr bool }{ {in: "1.2.3.4:1234", want: AddrPort{mustIP("1.2.3.4"), 1234}}, {in: "1.1.1.1:123456", wantErr: true}, {in: "1.1.1.1:-123", wantErr: true}, {in: "[::1]:1234", want: AddrPort{mustIP("::1"), 1234}}, {in: "[1.2.3.4]:1234", wantErr: true}, {in: "fe80::1:1234", wantErr: true}, {in: ":0", wantErr: true}, // if we need to parse this form, there should be a separate function that explicitly allows it } for _, test := range tests { t.Run(test.in, func(t *testing.T) { got, err := ParseAddrPort(test.in) if err != nil { if test.wantErr { return } t.Fatal(err) } if got != test.want { t.Errorf("got %v; want %v", got, test.want) } if got.String() != test.in { t.Errorf("String = %q; want %q", got.String(), test.in) } }) t.Run(test.in+"/AppendTo", func(t *testing.T) { got, err := ParseAddrPort(test.in) if err == nil { testAppendToMarshal(t, got) } }) // TextMarshal and TextUnmarshal mostly behave like // ParseAddrPort and String. Divergent behavior are handled in // TestAddrPortMarshalUnmarshal. t.Run(test.in+"/Marshal", func(t *testing.T) { var got AddrPort jsin := `"` + test.in + `"` err := json.Unmarshal([]byte(jsin), &got) if err != nil { if test.wantErr { return } t.Fatal(err) } if got != test.want { t.Errorf("got %v; want %v", got, test.want) } gotb, err := json.Marshal(got) if err != nil { t.Fatal(err) } if string(gotb) != jsin { t.Errorf("Marshal = %q; want %q", string(gotb), jsin) } }) } } func TestAddrPortMarshalUnmarshal(t *testing.T) { tests := []struct { in string want AddrPort }{ {"", AddrPort{}}, } for _, test := range tests { t.Run(test.in, func(t *testing.T) { orig := `"` + test.in + `"` var ipp AddrPort if err := json.Unmarshal([]byte(orig), &ipp); err != nil { t.Fatalf("failed to unmarshal: %v", err) } ippb, err := json.Marshal(ipp) if err != nil { t.Fatalf("failed to marshal: %v", err) } back := string(ippb) if orig != back { t.Errorf("Marshal = %q; want %q", back, orig) } testAppendToMarshal(t, ipp) }) } } type appendMarshaler interface { encoding.TextMarshaler AppendTo([]byte) []byte } // testAppendToMarshal tests that x's AppendTo and MarshalText methods yield the same results. // x's MarshalText method must not return an error. func testAppendToMarshal(t *testing.T, x appendMarshaler) { t.Helper() m, err := x.MarshalText() if err != nil { t.Fatalf("(%v).MarshalText: %v", x, err) } a := make([]byte, 0, len(m)) a = x.AppendTo(a) if !bytes.Equal(m, a) { t.Errorf("(%v).MarshalText = %q, (%v).AppendTo = %q", x, m, x, a) } } func TestIPv6Accessor(t *testing.T) { var a [16]byte for i := range a { a[i] = uint8(i) + 1 } ip := AddrFrom16(a) for i := range a { if got, want := ip.v6(uint8(i)), uint8(i)+1; got != want { t.Errorf("v6(%v) = %v; want %v", i, got, want) } } }