aboutsummaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2017-07-29 16:54:22 +0200
committerGitHub <noreply@github.com>2017-07-29 16:54:22 +0200
commit7b54ef23d5fb8461b278ac247fb5416ab73882a8 (patch)
tree58fcec0488b5c05a9fb8e04781454faa1bb585a6 /web
parent415170ae26977c25b54b522c70b6d043164385a3 (diff)
parent544a7cdd14c5b59f4a141e6887b47bce2bd9682e (diff)
downloadmitmproxy-7b54ef23d5fb8461b278ac247fb5416ab73882a8.tar.gz
mitmproxy-7b54ef23d5fb8461b278ac247fb5416ab73882a8.tar.bz2
mitmproxy-7b54ef23d5fb8461b278ac247fb5416ab73882a8.zip
Merge pull request #2471 from ujjwal96/traceback-fix
Fixed addon error in test suite
Diffstat (limited to 'web')
-rw-r--r--web/src/js/__tests__/components/FlowView/__snapshots__/DetailsSpec.js.snap4
-rw-r--r--web/src/js/__tests__/ducks/_tflow.js2
2 files changed, 3 insertions, 3 deletions
diff --git a/web/src/js/__tests__/components/FlowView/__snapshots__/DetailsSpec.js.snap b/web/src/js/__tests__/components/FlowView/__snapshots__/DetailsSpec.js.snap
index dcee1895..6e01ae85 100644
--- a/web/src/js/__tests__/components/FlowView/__snapshots__/DetailsSpec.js.snap
+++ b/web/src/js/__tests__/components/FlowView/__snapshots__/DetailsSpec.js.snap
@@ -12,7 +12,7 @@ exports[`ConnectionInfo Component should render correctly 1`] = `
Address:
</td>
<td>
- address:22
+ 127.0.0.1:22
</td>
</tr>
<tr>
@@ -47,7 +47,7 @@ exports[`Details Component should render correctly 1`] = `
Address:
</td>
<td>
- address:22
+ 127.0.0.1:22
</td>
</tr>
<tr>
diff --git a/web/src/js/__tests__/ducks/_tflow.js b/web/src/js/__tests__/ducks/_tflow.js
index f6a382bd..44b32342 100644
--- a/web/src/js/__tests__/ducks/_tflow.js
+++ b/web/src/js/__tests__/ducks/_tflow.js
@@ -2,7 +2,7 @@ export default function(){
return {
"client_conn": {
"address": [
- "address",
+ "127.0.0.1",
22
],
"alpn_proto_negotiated": "http/1.1",
">
/*******************************************************************************************[Rnd.h]
Copyright (c) 2012, Niklas Sorensson
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
associated documentation files (the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge, publish, distribute,
sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or
substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT
OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
**************************************************************************************************/

#ifndef Minisat_Rnd_h
#define Minisat_Rnd_h

#include "Vec.h"

namespace Minisat {

// Generate a random double:
static inline double drand(double& seed)
{
    seed *= 1389796;
    int q = (int)(seed / 2147483647);
    seed -= (double)q * 2147483647;
    return seed / 2147483647;
}


// Generate a random integer:
static inline int irand(double& seed, int size) { return (int)(drand(seed) * size); }


// Randomly shuffle the contents of a vector:
template<class T>
static void randomShuffle(double& seed, vec<T>& xs)
{
    for (int i = 0; i < xs.size(); i++){
        int pick = i + irand(seed, xs.size() - i);
        T tmp = xs[i];
        xs[i] = xs[pick];
        xs[pick] = tmp;
    }
}

// Randomly shuffle a vector of a vector (ugly)
template<class T>
static void randomShuffle(double& seed, vec<vec<T> >& xs)
{
    for (int i = 0; i < xs.size(); i++){
        int pick = i + irand(seed, xs.size() - i);
        vec<T> tmp; xs[i].moveTo(tmp);
        xs[pick].moveTo(xs[i]);
        tmp.moveTo(xs[pick]);
    }
}


//=================================================================================================
} // namespace Minisat
#endif