Best Go-testdeep code snippet using td.Lt
block.go
Source:block.go
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"2 "http://www.w3.org/TR/html4/transitional.dtd">3<html>4<head>5 <meta http-equiv="content-type" content="text/html; charset=utf-8">6 <title>Source file /src/pkg/crypto/aes/block.go</title>7 <link rel="stylesheet" type="text/css" href="../../../../doc/style.css">8 <script type="text/javascript" src="../../../../doc/godocs.js"></script>9</head>10<body>11 <script>12 // Catch 'enter' key down events and trigger the search form submission.13 function codesearchKeyDown(event) {14 if (event.which == 13) {15 var form = document.getElementById('codesearch');16 var query = document.getElementById('codesearchQuery');17 form.q.value = "lang:go package:go.googlecode.com " + query.value;18 document.getElementById('codesearch').submit();19} return true;20}21 // Capture the submission event and construct the query parameter.22 function codeSearchSubmit() {23 var query = document.getElementById('codesearchQuery');24 var form = document.getElementById('codesearch');25 form.q.value = "lang:go package:go.googlecode.com " + query.value;26 return true;27} </script>28<div id="topnav">29 <table summary="">30 <tr>31 <td id="headerImage">32 <a href="../../../../index.html"><img src="../../../../doc/logo-153x55.png" height="55" width="153" alt="Go Home Page" style="border:0" /></a>33 </td>34 <td>35 <div id="headerDocSetTitle">The Go Programming Language</div>36 </td>37 <td>38 <!-- <table>39 <tr>40 <td>41 <! The input box is outside of the form because we want to add42 a couple of restricts to the query before submitting. If we just43 add the restricts to the text box before submitting, then they44 appear in the box when the user presses 'back'. Thus we use a45 hidden field in the form. However, there's no way to stop the46 non-hidden text box from also submitting a value unless we move47 it outside of the form48 <input type="search" id="codesearchQuery" value="" size="30" onkeydown="return codesearchKeyDown(event);"/>49 <form method="GET" action="http://www.google.com/codesearch" id="codesearch" class="search" onsubmit="return codeSearchSubmit();" style="display:inline;">50 <input type="hidden" name="q" value=""/>51 <input type="submit" value="Code search" />52 <span style="color: red">(TODO: remove for now?)</span>53 </form>54 </td>55 </tr>56 <tr>57 <td>58 <span style="color: gray;">(e.g. “pem” or “xml”)</span>59 </td>60 </tr>61 </table> -->62 </td>63 </tr>64 </table>65</div>66<div id="linkList">67 <ul>68 <li class="navhead"><a href="../../../../index.html">Home</a></li>69 <li class="blank"> </li>70 <li class="navhead">Documents</li>71 <li><a href="../../../../doc/go_tutorial.html">Tutorial</a></li>72 <li><a href="../../../../doc/effective_go.html">Effective Go</a></li>73 <li><a href="../../../../doc/go_faq.html">FAQ</a></li>74 <li><a href="../../../../doc/go_lang_faq.html">Language Design FAQ</a></li>75 <li><a href="http://www.youtube.com/watch?v=rKnDgT73v8s">Tech talk (1 hour)</a> (<a href="../../../../doc/go_talk-20091030.pdf">PDF</a>)</li>76 <li><a href="../../../../doc/go_spec.html">Language Specification</a></li>77 <li><a href="../../../../doc/go_mem.html">Memory Model</a></li>78 <li><a href="../../../../doc/go_for_cpp_programmers.html">Go for C++ Programmers</a></li>79 <li class="blank"> </li>80 <li class="navhead">How To</li>81 <li><a href="../../../../doc/install.html">Install Go</a></li>82 <li><a href="../../../../doc/contribute.html">Contribute code</a></li>83 <li class="blank"> </li>84 <li class="navhead">Programming</li>85 <li><a href="../../../../cmd/index.html">Command documentation</a></li>86 <li><a href="../../../../pkg/index.html">Package documentation</a></li>87 <li><a href="../../../index.html">Source files</a></li>88 <li class="blank"> </li>89 <li class="navhead">Help</li>90 <li>#go-nuts on irc.freenode.net</li>91 <li><a href="http://groups.google.com/group/golang-nuts">Go Nuts mailing list</a></li>92 <li><a href="http://code.google.com/p/go/issues/list">Issue tracker</a></li>93 <li class="blank"> </li>94 <li class="navhead">Go code search</li>95 <form method="GET" action="http://golang.org/search" class="search">96 <input type="search" name="q" value="" size="25" style="width:80%; max-width:200px" />97 <input type="submit" value="Go" />98 </form>99 <li class="blank"> </li>100 <li class="navhead">Last update</li>101 <li>Thu Nov 12 16:01:31 PST 2009</li>102 </ul>103</div>104<div id="content">105 <h1 id="generatedHeader">Source file /src/pkg/crypto/aes/block.go</h1>106 <!-- The Table of Contents is automatically inserted in this <div>.107 Do not delete this <div>. -->108 <div id="nav"></div>109 <!-- Content is HTML-escaped elsewhere -->110 <pre>111<a id="L1"></a><span class="comment">// Copyright 2009 The Go Authors. All rights reserved.</span>112<a id="L2"></a><span class="comment">// Use of this source code is governed by a BSD-style</span>113<a id="L3"></a><span class="comment">// license that can be found in the LICENSE file.</span>114<a id="L5"></a><span class="comment">// This Go implementation is derived in part from the reference</span>115<a id="L6"></a><span class="comment">// ANSI C implementation, which carries the following notice:</span>116<a id="L7"></a><span class="comment">//</span>117<a id="L8"></a><span class="comment">// rijndael-alg-fst.c</span>118<a id="L9"></a><span class="comment">//</span>119<a id="L10"></a><span class="comment">// @version 3.0 (December 2000)</span>120<a id="L11"></a><span class="comment">//</span>121<a id="L12"></a><span class="comment">// Optimised ANSI C code for the Rijndael cipher (now AES)</span>122<a id="L13"></a><span class="comment">//</span>123<a id="L14"></a><span class="comment">// @author Vincent Rijmen <vincent.rijmen@esat.kuleuven.ac.be></span>124<a id="L15"></a><span class="comment">// @author Antoon Bosselaers <antoon.bosselaers@esat.kuleuven.ac.be></span>125<a id="L16"></a><span class="comment">// @author Paulo Barreto <paulo.barreto@terra.com.br></span>126<a id="L17"></a><span class="comment">//</span>127<a id="L18"></a><span class="comment">// This code is hereby placed in the public domain.</span>128<a id="L19"></a><span class="comment">//</span>129<a id="L20"></a><span class="comment">// THIS SOFTWARE IS PROVIDED BY THE AUTHORS ''AS IS'' AND ANY EXPRESS</span>130<a id="L21"></a><span class="comment">// OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED</span>131<a id="L22"></a><span class="comment">// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE</span>132<a id="L23"></a><span class="comment">// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE</span>133<a id="L24"></a><span class="comment">// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR</span>134<a id="L25"></a><span class="comment">// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF</span>135<a id="L26"></a><span class="comment">// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR</span>136<a id="L27"></a><span class="comment">// BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,</span>137<a id="L28"></a><span class="comment">// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE</span>138<a id="L29"></a><span class="comment">// OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,</span>139<a id="L30"></a><span class="comment">// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</span>140<a id="L31"></a><span class="comment">//</span>141<a id="L32"></a><span class="comment">// See FIPS 197 for specification, and see Daemen and Rijmen's Rijndael submission</span>142<a id="L33"></a><span class="comment">// for implementation details.</span>143<a id="L34"></a><span class="comment">// http://www.csrc.nist.gov/publications/fips/fips197/fips-197.pdf</span>144<a id="L35"></a><span class="comment">// http://csrc.nist.gov/archive/aes/rijndael/Rijndael-ammended.pdf</span>145<a id="L37"></a>package aes146<a id="L39"></a><span class="comment">// Encrypt one block from src into dst, using the expanded key xk.</span>147<a id="L40"></a>func encryptBlock(xk []uint32, src, dst []byte) {148 <a id="L41"></a>var s0, s1, s2, s3, t0, t1, t2, t3 uint32;149 <a id="L43"></a>s0 = uint32(src[0])<<24 | uint32(src[1])<<16 | uint32(src[2])<<8 | uint32(src[3]);150 <a id="L44"></a>s1 = uint32(src[4])<<24 | uint32(src[5])<<16 | uint32(src[6])<<8 | uint32(src[7]);151 <a id="L45"></a>s2 = uint32(src[8])<<24 | uint32(src[9])<<16 | uint32(src[10])<<8 | uint32(src[11]);152 <a id="L46"></a>s3 = uint32(src[12])<<24 | uint32(src[13])<<16 | uint32(src[14])<<8 | uint32(src[15]);153 <a id="L48"></a><span class="comment">// First round just XORs input with key.</span>154 <a id="L49"></a>s0 ^= xk[0];155 <a id="L50"></a>s1 ^= xk[1];156 <a id="L51"></a>s2 ^= xk[2];157 <a id="L52"></a>s3 ^= xk[3];158 <a id="L54"></a><span class="comment">// Middle rounds shuffle using tables.</span>159 <a id="L55"></a><span class="comment">// Number of rounds is set by length of expanded key.</span>160 <a id="L56"></a>nr := len(xk)/4 - 2; <span class="comment">// - 2: one above, one more below</span>161 <a id="L57"></a>k := 4;162 <a id="L58"></a>for r := 0; r < nr; r++ {163 <a id="L59"></a>t0 = xk[k+0] ^ te[0][s0>>24] ^ te[1][s1>>16&0xff] ^ te[2][s2>>8&0xff] ^ te[3][s3&0xff];164 <a id="L60"></a>t1 = xk[k+1] ^ te[0][s1>>24] ^ te[1][s2>>16&0xff] ^ te[2][s3>>8&0xff] ^ te[3][s0&0xff];165 <a id="L61"></a>t2 = xk[k+2] ^ te[0][s2>>24] ^ te[1][s3>>16&0xff] ^ te[2][s0>>8&0xff] ^ te[3][s1&0xff];166 <a id="L62"></a>t3 = xk[k+3] ^ te[0][s3>>24] ^ te[1][s0>>16&0xff] ^ te[2][s1>>8&0xff] ^ te[3][s2&0xff];167 <a id="L63"></a>k += 4;168 <a id="L64"></a>s0, s1, s2, s3 = t0, t1, t2, t3;169 <a id="L65"></a>}170 <a id="L67"></a><span class="comment">// Last round uses s-box directly and XORs to produce output.</span>171 <a id="L68"></a>s0 = uint32(sbox0[t0>>24])<<24 | uint32(sbox0[t1>>16&0xff])<<16 | uint32(sbox0[t2>>8&0xff])<<8 | uint32(sbox0[t3&0xff]);172 <a id="L69"></a>s1 = uint32(sbox0[t1>>24])<<24 | uint32(sbox0[t2>>16&0xff])<<16 | uint32(sbox0[t3>>8&0xff])<<8 | uint32(sbox0[t0&0xff]);173 <a id="L70"></a>s2 = uint32(sbox0[t2>>24])<<24 | uint32(sbox0[t3>>16&0xff])<<16 | uint32(sbox0[t0>>8&0xff])<<8 | uint32(sbox0[t1&0xff]);174 <a id="L71"></a>s3 = uint32(sbox0[t3>>24])<<24 | uint32(sbox0[t0>>16&0xff])<<16 | uint32(sbox0[t1>>8&0xff])<<8 | uint32(sbox0[t2&0xff]);175 <a id="L73"></a>s0 ^= xk[k+0];176 <a id="L74"></a>s1 ^= xk[k+1];177 <a id="L75"></a>s2 ^= xk[k+2];178 <a id="L76"></a>s3 ^= xk[k+3];179 <a id="L78"></a>dst[0], dst[1], dst[2], dst[3] = byte(s0>>24), byte(s0>>16), byte(s0>>8), byte(s0);180 <a id="L79"></a>dst[4], dst[5], dst[6], dst[7] = byte(s1>>24), byte(s1>>16), byte(s1>>8), byte(s1);181 <a id="L80"></a>dst[8], dst[9], dst[10], dst[11] = byte(s2>>24), byte(s2>>16), byte(s2>>8), byte(s2);182 <a id="L81"></a>dst[12], dst[13], dst[14], dst[15] = byte(s3>>24), byte(s3>>16), byte(s3>>8), byte(s3);183<a id="L82"></a>}184<a id="L84"></a><span class="comment">// Decrypt one block from src into dst, using the expanded key xk.</span>185<a id="L85"></a>func decryptBlock(xk []uint32, src, dst []byte) {186 <a id="L86"></a>var s0, s1, s2, s3, t0, t1, t2, t3 uint32;187 <a id="L88"></a>s0 = uint32(src[0])<<24 | uint32(src[1])<<16 | uint32(src[2])<<8 | uint32(src[3]);188 <a id="L89"></a>s1 = uint32(src[4])<<24 | uint32(src[5])<<16 | uint32(src[6])<<8 | uint32(src[7]);189 <a id="L90"></a>s2 = uint32(src[8])<<24 | uint32(src[9])<<16 | uint32(src[10])<<8 | uint32(src[11]);190 <a id="L91"></a>s3 = uint32(src[12])<<24 | uint32(src[13])<<16 | uint32(src[14])<<8 | uint32(src[15]);191 <a id="L93"></a><span class="comment">// First round just XORs input with key.</span>192 <a id="L94"></a>s0 ^= xk[0];193 <a id="L95"></a>s1 ^= xk[1];194 <a id="L96"></a>s2 ^= xk[2];195 <a id="L97"></a>s3 ^= xk[3];196 <a id="L99"></a><span class="comment">// Middle rounds shuffle using tables.</span>197 <a id="L100"></a><span class="comment">// Number of rounds is set by length of expanded key.</span>198 <a id="L101"></a>nr := len(xk)/4 - 2; <span class="comment">// - 2: one above, one more below</span>199 <a id="L102"></a>k := 4;200 <a id="L103"></a>for r := 0; r < nr; r++ {201 <a id="L104"></a>t0 = xk[k+0] ^ td[0][s0>>24] ^ td[1][s3>>16&0xff] ^ td[2][s2>>8&0xff] ^ td[3][s1&0xff];202 <a id="L105"></a>t1 = xk[k+1] ^ td[0][s1>>24] ^ td[1][s0>>16&0xff] ^ td[2][s3>>8&0xff] ^ td[3][s2&0xff];203 <a id="L106"></a>t2 = xk[k+2] ^ td[0][s2>>24] ^ td[1][s1>>16&0xff] ^ td[2][s0>>8&0xff] ^ td[3][s3&0xff];204 <a id="L107"></a>t3 = xk[k+3] ^ td[0][s3>>24] ^ td[1][s2>>16&0xff] ^ td[2][s1>>8&0xff] ^ td[3][s0&0xff];205 <a id="L108"></a>k += 4;206 <a id="L109"></a>s0, s1, s2, s3 = t0, t1, t2, t3;207 <a id="L110"></a>}208 <a id="L112"></a><span class="comment">// Last round uses s-box directly and XORs to produce output.</span>209 <a id="L113"></a>s0 = uint32(sbox1[t0>>24])<<24 | uint32(sbox1[t3>>16&0xff])<<16 | uint32(sbox1[t2>>8&0xff])<<8 | uint32(sbox1[t1&0xff]);210 <a id="L114"></a>s1 = uint32(sbox1[t1>>24])<<24 | uint32(sbox1[t0>>16&0xff])<<16 | uint32(sbox1[t3>>8&0xff])<<8 | uint32(sbox1[t2&0xff]);211 <a id="L115"></a>s2 = uint32(sbox1[t2>>24])<<24 | uint32(sbox1[t1>>16&0xff])<<16 | uint32(sbox1[t0>>8&0xff])<<8 | uint32(sbox1[t3&0xff]);212 <a id="L116"></a>s3 = uint32(sbox1[t3>>24])<<24 | uint32(sbox1[t2>>16&0xff])<<16 | uint32(sbox1[t1>>8&0xff])<<8 | uint32(sbox1[t0&0xff]);213 <a id="L118"></a>s0 ^= xk[k+0];214 <a id="L119"></a>s1 ^= xk[k+1];215 <a id="L120"></a>s2 ^= xk[k+2];216 <a id="L121"></a>s3 ^= xk[k+3];217 <a id="L123"></a>dst[0], dst[1], dst[2], dst[3] = byte(s0>>24), byte(s0>>16), byte(s0>>8), byte(s0);218 <a id="L124"></a>dst[4], dst[5], dst[6], dst[7] = byte(s1>>24), byte(s1>>16), byte(s1>>8), byte(s1);219 <a id="L125"></a>dst[8], dst[9], dst[10], dst[11] = byte(s2>>24), byte(s2>>16), byte(s2>>8), byte(s2);220 <a id="L126"></a>dst[12], dst[13], dst[14], dst[15] = byte(s3>>24), byte(s3>>16), byte(s3>>8), byte(s3);221<a id="L127"></a>}222<a id="L129"></a><span class="comment">// Apply sbox0 to each byte in w.</span>223<a id="L130"></a>func subw(w uint32) uint32 {224 <a id="L131"></a>return uint32(sbox0[w>>24])<<24 |225 <a id="L132"></a>uint32(sbox0[w>>16&0xff])<<16 |226 <a id="L133"></a>uint32(sbox0[w>>8&0xff])<<8 |227 <a id="L134"></a>uint32(sbox0[w&0xff])228<a id="L135"></a>}229<a id="L137"></a><span class="comment">// Rotate</span>230<a id="L138"></a>func rotw(w uint32) uint32 { return w<<8 | w>>24 }231<a id="L140"></a><span class="comment">// Key expansion algorithm. See FIPS-197, Figure 11.</span>232<a id="L141"></a><span class="comment">// Their rcon[i] is our powx[i-1] << 24.</span>233<a id="L142"></a>func expandKey(key []byte, enc, dec []uint32) {234 <a id="L143"></a><span class="comment">// Encryption key setup.</span>235 <a id="L144"></a>var i int;236 <a id="L145"></a>nk := len(key) / 4;237 <a id="L146"></a>for i = 0; i < nk; i++ {238 <a id="L147"></a>enc[i] = uint32(key[4*i])<<24 | uint32(key[4*i+1])<<16 | uint32(key[4*i+2])<<8 | uint32(key[4*i+3])239 <a id="L148"></a>}240 <a id="L149"></a>for ; i < len(enc); i++ {241 <a id="L150"></a>t := enc[i-1];242 <a id="L151"></a>if i%nk == 0 {243 <a id="L152"></a>t = subw(rotw(t)) ^ (uint32(powx[i/nk-1]) << 24)244 <a id="L153"></a>} else if nk > 6 && i%nk == 4 {245 <a id="L154"></a>t = subw(t)246 <a id="L155"></a>}247 <a id="L156"></a>enc[i] = enc[i-nk] ^ t;248 <a id="L157"></a>}249 <a id="L159"></a><span class="comment">// Derive decryption key from encryption key.</span>250 <a id="L160"></a><span class="comment">// Reverse the 4-word round key sets from enc to produce dec.</span>251 <a id="L161"></a><span class="comment">// All sets but the first and last get the MixColumn transform applied.</span>252 <a id="L162"></a>if dec == nil {253 <a id="L163"></a>return254 <a id="L164"></a>}255 <a id="L165"></a>n := len(enc);256 <a id="L166"></a>for i := 0; i < n; i += 4 {257 <a id="L167"></a>ei := n - i - 4;258 <a id="L168"></a>for j := 0; j < 4; j++ {259 <a id="L169"></a>x := enc[ei+j];260 <a id="L170"></a>if i > 0 && i+4 < n {261 <a id="L171"></a>x = td[0][sbox0[x>>24]] ^ td[1][sbox0[x>>16&0xff]] ^ td[2][sbox0[x>>8&0xff]] ^ td[3][sbox0[x&0xff]]262 <a id="L172"></a>}263 <a id="L173"></a>dec[i+j] = x;264 <a id="L174"></a>}265 <a id="L175"></a>}266<a id="L176"></a>}267</pre>268</div>269<div id="footer">270<p>Except as noted, this content is271 licensed under <a href="http://creativecommons.org/licenses/by/3.0/">272 Creative Commons Attribution 3.0</a>.273</div>274<script type="text/javascript">275var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");276document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));277</script>278<script type="text/javascript">279var pageTracker = _gat._getTracker("UA-11222381-2");280pageTracker._trackPageview();281</script>282</body>283</html>284<!-- generated at Thu Nov 12 15:42:51 PST 2009 -->...
format_html_test.go
Source:format_html_test.go
1// Copyright 2021 The Cockroach Authors.2//3// Use of this software is governed by the Business Source License4// included in the file licenses/BSL.txt.5//6// As of the Change Date specified in that file, in accordance with7// the Business Source License, use of this software will be governed8// by the Apache License, Version 2.0, included in the file9// licenses/APL.txt.10package clisqlexec11import (12 "bytes"13 "fmt"14 "io/ioutil"15 "testing"16 "github.com/cockroachdb/cockroach/pkg/util/leaktest"17 "github.com/cockroachdb/cockroach/pkg/util/log"18)19func TestRenderHTML(t *testing.T) {20 defer leaktest.AfterTest(t)()21 defer log.Scope(t).Close(t)22 cols := []string{"colname"}23 align := "d"24 rows := [][]string{25 {"<b>foo</b>"},26 {"bar"},27 }28 type testCase struct {29 reporter htmlReporter30 out string31 }32 testCases := []testCase{33 {34 reporter: htmlReporter{},35 out: `<table>36<thead><tr><th>colname</th></tr></thead>37<tbody>38<tr><td><b>foo</b></td></tr>39<tr><td>bar</td></tr>40</tbody>41</table>42`,43 },44 {45 reporter: htmlReporter{escape: true},46 out: `<table>47<thead><tr><th>colname</th></tr></thead>48<tbody>49<tr><td><b>foo</b></td></tr>50<tr><td>bar</td></tr>51</tbody>52</table>53`,54 },55 {56 reporter: htmlReporter{rowStats: true},57 out: `<table>58<thead><tr><th>row</th><th>colname</th></tr></thead>59<tbody>60<tr><td>1</td><td><b>foo</b></td></tr>61<tr><td>2</td><td>bar</td></tr>62</tbody>63<tfoot><tr><td colspan=2>2 rows</td></tr></tfoot></table>64`,65 },66 {67 reporter: htmlReporter{escape: true, rowStats: true},68 out: `<table>69<thead><tr><th>row</th><th>colname</th></tr></thead>70<tbody>71<tr><td>1</td><td><b>foo</b></td></tr>72<tr><td>2</td><td>bar</td></tr>73</tbody>74<tfoot><tr><td colspan=2>2 rows</td></tr></tfoot></table>75`,76 },77 }78 for _, tc := range testCases {79 name := fmt.Sprintf("escape=%v/rowStats=%v", tc.reporter.escape, tc.reporter.rowStats)80 t.Run(name, func(t *testing.T) {81 var buf bytes.Buffer82 err := render(&tc.reporter, &buf, ioutil.Discard,83 cols, NewRowSliceIter(rows, align),84 nil /* completedHook */, nil /* noRowsHook */)85 if err != nil {86 t.Fatal(err)87 }88 if tc.out != buf.String() {89 t.Errorf("expected:\n%s\ngot:\n%s", tc.out, buf.String())90 }91 })92 }93}...
fragments.go
Source:fragments.go
1package fixtures2const (3 StaticIdentifierJavadocCell = `<td class=\"colFirst\"><code>static <E> <a href=\"../../../../com/google/common/collect/ImmutableSet.Builder.html\" title=\"class in com.google.common.collect\">ImmutableSet.Builder</a><E></code></td>`4 StaticMethodJavadocRow = `<tr class="altColor"><td class="colFirst"><code>static <E> <a href="../../../../com/google/common/collect/ImmutableSet.Builder.html" title="class in com.google.common.collect">ImmutableSet.Builder</a><E></code></td><td class="colLast"><code><strong><a href="../../../../com/google/common/collect/ImmutableSet.html#builder()">builder</a></strong>()</code><div class="block">Returns a new builder.</div></td></tr>`5 MultipleLinksCell = `<td class="colLast"><code><span class="memberNameLink"><a href="../../java/util/Arrays.html#parallelPrefix-double:A-java.util.function.DoubleBinaryOperator-">parallelPrefix</a></span>(double[] array, <a href="../../java/util/function/DoubleBinaryOperator.html" title="interface in java.util.function">DoubleBinaryOperator</a> op)</code> <div class="block">Cumulates, in parallel, each element of the given array in place, using the supplied function.</div> </td>`6)...
Lt
Using AI Code Generation
1import (2func main() {3 data := [][]string{4 []string{"1", "2", "3", "4", "5"},5 []string{"6", "7", "8", "9", "10"},6 []string{"11", "12", "13", "14", "15"},7 []string{"16", "17", "18", "19", "20"},8 []string{"21", "22", "23", "24", "25"},9 }10 table := tablewriter.NewWriter(os.Stdout)11 table.SetHeader([]string{"A", "B", "C", "D", "E"})12 for _, v := range data {13 table.Append(v)14 }15 table.Lt(0)16 table.Render()17}
Lt
Using AI Code Generation
1import "fmt"2func main() {3 if( a < b ) {4 fmt.Printf("Line 1 - a is less than b\n" )5 } else {6 fmt.Printf("Line 1 - a is not less than b\n" )7 }8 if( a > b ) {9 fmt.Printf("Line 2 - a is greater than b\n" )10 } else {11 fmt.Printf("Line 2 - a is not greater than b\n" )12 }13 if( a <= b ) {14 fmt.Printf("Line 3 - a is either less than or equal to b\n" )15 }16 if( b >= a ) {17 fmt.Printf("Line 4 - b is either greater than or equal to b\n" )18 }19}20import "fmt"21func main() {22 if( a == b ) {23 fmt.Printf("Line 1 - a is equal to b\n" )24 } else {25 fmt.Printf("Line 1 - a is not equal to b\n" )26 }27 if ( a != b ) {28 fmt.Printf("Line 2 - a is not equal to b\n" )29 }30 if ( a == b ) {31 fmt.Printf("Line 3 - a is equal to b\n" )32 } else {33 fmt.Printf("Line 3 - a is not equal to b\n" )34 }35 if ( a != b ) {36 fmt.Printf("Line 4 - a is not equal to b\n" )37 }38}
Lt
Using AI Code Generation
1import (2func main() {3 t := time.Now()4 fmt.Println(t)5 fmt.Println(t.Lt(time.Now().Add(time.Second)))6}7import (8func main() {9 t := time.Now()10 fmt.Println(t)11 fmt.Println(t.Add(time.Second))12}13import (14func main() {15 t := time.Now()16 fmt.Println(t)17 fmt.Println(t.AddDate(1, 2, 3))18}19import (20func main() {21 t := time.Now()22 fmt.Println(t)23 fmt.Println(t.Sub(time.Now().Add(time.Second)))24}25import (26func main() {27 t := time.Now()28 fmt.Println(t)29 fmt.Println(t.Round(time.Second))30}31import (32func main() {33 t := time.Now()34 fmt.Println(t)35 fmt.Println(t.Truncate(time.Second))36}37import (38func main() {39 t := time.Now()40 fmt.Println(t)41 fmt.Println(t.After(time.Now().Add(time.Second)))42}43import (44func main() {45 t := time.Now()46 fmt.Println(t)47 fmt.Println(t.Before(time.Now().Add(time.Second)))48}49import (50func main() {51 t := time.Now()52 fmt.Println(t)53 fmt.Println(t.Equal(time.Now().Add(time.Second)))54}55import (56func main() {
Lt
Using AI Code Generation
1import "fmt"2func main() {3 t1 = td{1, 2}4 t2 := td{3, 4}5 fmt.Println(t1.Lt(t2))6}7import "fmt"8func main() {9 t1 = td{1, 2}10 t2 := td{3, 4}11 fmt.Println(t1.Le(t2))12}13import "fmt"14func main() {15 t1 = td{1, 2}16 t2 := td{3, 4}17 fmt.Println(t1.Gt(t2))18}19import "fmt"20func main() {21 t1 = td{1, 2}22 t2 := td{3, 4}23 fmt.Println(t1.Ge(t2))24}25import "fmt"26func main() {27 t1 = td{1, 2}28 t2 := td{3, 4}29 fmt.Println(t1.Eq(t2))30}31import "fmt"32func main() {33 t1 = td{1, 2}34 t2 := td{3, 4}35 fmt.Println(t1.Ne(t2))36}37import "fmt"38func main() {39 t1 = td{1, 2}40 fmt.Println(t1.Abs())41}
Lt
Using AI Code Generation
1import (2type td struct {3}4func main() {5 t := td{1, 2}6 fmt.Println(unsafe.Sizeof(t))7 fmt.Println(t.Lt())8}9func (t td) Lt() bool {10}11import (12type td struct {13}14func main() {15 t := td{1, 2}16 fmt.Println(unsafe.Sizeof(t))17 fmt.Println(t.Lt())18}19func (t td) Lt() bool {20}21import (22type td struct {23}24func main() {25 t := td{1, 2}26 fmt.Println(unsafe.Sizeof(t))27 fmt.Println(t.Lt())28}29func (t td) Lt() bool {30}31import (32type td struct {33}34func main() {35 t := td{1, 2}36 fmt.Println(unsafe.Sizeof(t))37 fmt.Println(t.Lt())38}39func (t td) Lt() bool {40}41import (42type td struct {43}44func main() {45 t := td{1, 2}46 fmt.Println(unsafe.Sizeof(t))47 fmt.Println(t.Lt())48}49func (t td) Lt() bool {50}51import (52type td struct {
Lt
Using AI Code Generation
1import (2func main() {3 t.Lt(10, 20)4 t.Lt(20, 10)5 t.Lt(10, 10)6}7import (8func main() {9 t.Gt(10, 20)10 t.Gt(20, 10)11 t.Gt(10, 10)12}13import (14func main() {15 t.Lte(10, 20)16 t.Lte(20, 10)17 t.Lte(10, 10)18}19import (20func main() {21 t.Gte(10, 20)22 t.Gte(20, 10)23 t.Gte(10, 10)24}25import (26func main() {27 t.Eql(10, 20)28 t.Eql(20, 10)29 t.Eql(10, 10)30}31import (32func main() {33 t.Neql(10, 20)34 t.Neql(20, 10)35 t.Neql(10, 10)36}37import (38func main() {39 t.IsTrue(true)40 t.IsTrue(false)41}42import (43func main() {44 t.IsFalse(true)45 t.IsFalse(false)
Lt
Using AI Code Generation
1import (2type td struct {3}4func (t *td) Lt(other interface{}) bool {5 if reflect.TypeOf(t).Kind() != reflect.TypeOf(other).Kind() {6 }7 oth := other.(td)8 if t.a < oth.a && t.b < oth.b {9 }10}11func main() {12 t1 := td{1, 2}13 t2 := td{1, 3}14 t3 := td{2, 3}15 fmt.Println(t1.Lt(t2))16 fmt.Println(t1.Lt(t3))17}18import (19type td struct {20}21func (t *td) Lt(other interface{}) bool {22 if reflect.TypeOf(t).Kind() != reflect.TypeOf(other).Kind() {23 }24 oth := other.(td)25 if t.a < oth.a && t.b < oth.b {26 }27}28func main() {29 t1 := td{1, 2}30 t2 := td{1, 3}31 t3 := td{2, 3}32 fmt.Println(t1.Lt(t2))33 fmt.Println(t1.Lt(t3))34}35import (36type td struct {37}38func (t *td) Lt(other interface{}) bool {39 if reflect.TypeOf(t).Kind() != reflect.TypeOf(other).Kind() {40 }41 oth := other.(td)42 if t.a < oth.a && t.b < oth.b {43 }44}45func main() {46 t1 := td{1, 2}47 t2 := td{1, 3}48 t3 := td{2, 3}49 fmt.Println(t1.Lt(t2))50 fmt.Println(t1.Lt(t3))51}
Lt
Using AI Code Generation
1import (2func main() {3 s := []string{"a", "b", "c", "d", "e", "f", "g", "h"}4 x := []int{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}5 y := []float64{1.1, 2.2, 3.3, 4.4, 5.5, 6.6, 7.7, 8.8, 9.9, 10.1}6 z := []struct {7 }{8 {"A", 10},9 {"B", 20},10 {"C", 30},11 {"D", 40},12 {"E", 50},13 {"F", 60},14 {"G", 70},15 {"H", 80},16 {"I", 90},17 {"J", 100},18 }19 b := []byte("abcdefgh")20 r := []rune("abcdefgh")21 bl := []bool{true, false, true, false, true, false, true, false}22 c := []complex128{1 + 2i, 2 + 3i, 3 + 4i, 4 + 5i, 5 + 6i, 6 + 7i, 7 + 8i, 8 + 9i, 9 + 10i, 10 + 11i}23 u := []uint{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}24 u8 := []uint8{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}
Lt
Using AI Code Generation
1import (2func main() {3 a.Set("2")4 b.Set("3")5 fmt.Println(a.Lt(b))6}7func (t Td) Lt(t1 Td) bool8import (9func main() {10 a.Set("2")11 b.Set("3")12 fmt.Println(a.Lt(b))13}
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!