GithubHelp home page GithubHelp logo

Comments (6)

ibc avatar ibc commented on May 14, 2024

Wow, found it! In Linux this does not work as expected:

ByePacket::Iterator it = bye1.Begin();

fct_chk_eq_int(*(it), ssrc1);
fct_chk_eq_int(*(++it), ssrc2);

But this does work:

ByePacket::Iterator it = bye1.Begin();

fct_chk_eq_int(*(it), ssrc1);
it++;
fct_chk_eq_int(*(it), ssrc2);

from mediasoup.

ibc avatar ibc commented on May 14, 2024

I don't know why this happens. The following C++ foo.cpp code does work as expected in the same Linux server:

#include <iostream>
#include <vector>

int main()
{
  std::vector<int> values;
  
  values.push_back(1111);
  values.push_back(2222);
  
  std::vector<int>::iterator it = values.begin();
  
  std::cout << "first value  : " << *it << std::endl;
  std::cout << "second value : " << *(++it) << std::endl;
}
$ g++ -std=c++11 foo.cpp && ./a.out
first value  : 1111
second value : 2222

So I will reopen the issue.

from mediasoup.

jmillan avatar jmillan commented on May 14, 2024

Weird.., let me check it.

from mediasoup.

ibc avatar ibc commented on May 14, 2024

By doing some local testings, I think that parameters given to fct functions must be "static", I mean: those will be evaluated after the full test code ends (not sure how to explain it). So, don't evaluate variables within a fct function.

from mediasoup.

jmillan avatar jmillan commented on May 14, 2024

I guess this issue does not make sense anymore

from mediasoup.

ibc avatar ibc commented on May 14, 2024

Indeed. I've tested the original code with the new test unit framework and it does NOT fail in Linux:

REQUIRE(*(++it) == ssrc2);

from mediasoup.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.