Setup GTest on Visual Studio 2010

Posted: November 21, 2012 in open source

Found this source from http://stackoverflow.com/questions/531941/how-to-setup-google-c-testing-framework-gtest-on-visual-studio-2005.

It was very useful to try.

Get Google C++ Testing Framework

  1. Download the latest gtest framework
  2. Unzip to C:\gtest

Build the Framework Libraries

  1. Open C:\gtest\msvc\gtest.sln in Visual Studio
  2. Set Configuration to “Debug”
  3. Build Solution

Create and Configure Your Test Project

  1. Create a new solution and choose the template Visual C++ > Win32 > Win32 Console Application
  2. Right click the newly created project and choose Properties
  3. Change Configuration to Debug.
  4. Configuration Properties > C/C++ > General > Additional Include Directories: AddC:\gtest\include
  5. Configuration Properties > C/C++ > Code Generation > Runtime Library: If your code links to a runtime DLL, choose Multi-threaded Debug DLL (/MDd). If not, choose Multi-threaded Debug (/MTd).
  6. Configuration Properties > Linker > General > Additional Library Directories: AddC:\gtest\msvc\gtest\Debug
  7. Configuration Properties > Linker > Input > Additional Dependencies: Add gtestd.lib

 

Am I on a right track?

Posted: October 29, 2012 in open source

When I chose to bug fix using c++ I thought it’s something sounds familiar and I can do well on that. But later I realized I have no idea, that where I have to start from, what I have to do..

Well one of my class mate is also doing same so I have asked him that what we can do about it…. Well seems like he knows at least where to start.

He suggested me to built the webkit first. So I cloned the webkit., yes it took more than 1 hour to download to my mac. Then built it without using “–debug” accidentally. So delete the work and started from scratch again. Took another 1:30 hours to download the webkit and tis time built it using debug mode. Got successful message.

I suppose to release R0.2 by today. But I have no idea… To be honest with you, I don’t even know what to ask from others to get help…. Hope someone can help me to put me on right track.

WebVTT and tracks

Posted: September 23, 2012 in open source

WebVTT (Web Video Text Track)

Basically it is a content of caption for video that play on web. Me and my team members are working on queue time stamp. So I’ll post my experience after I explore more into it….

Got up early and start working on the job assigned to my team. Writing all possible test cases to write a test function for queue time stamp. Mmm… have to think all natural human mistakes and possibilities.

Trying to clone Mozilla-Central 4th time on my Mac (Mountain Lion) using GitHub for Mac. It is failing again… No luck with command line too. 😦 Anyone has similar problem?

Starting to build firefox….

Posted: September 13, 2012 in open source

I’m very excieted now… this is my first open-source development on firefox… 

Fardad with OOP344 20121's  Section A
Fardad with OOP344 20121's  Section A
Fardad with OOP344 20121's  Section A
Fardad with OOP344 20121's  Section A
Fardad with OOP344 20121's  Section A

Fardad with OOP344 20121's  Section A
Fardad with OOP344 20121's  Section A

#include <iostream>
using namespace std;

#include "tqueue.h"

template <class T>
void print(Tqueue<T>& Q){
  bool done = false;
  Q.goHead();
  cout<<"NULL <- [HEAD] ";
  if(!Q.isEmpty()){
    do{
      cout<<Q.visit();
      if(Q.goNext()) cout<<" <=> ";
      else{
        done = true;
      }
    }while(!done);
  }
  cout<<" [TAIL] -> NULL"<<endl;
  cout<<endl<<endl;
}

int main(){
  Tqueue<int> Q;
  cout<<"Before Data to be Added:"<<endl;
  print(Q);

  for(int i=1;i<=6;i+=1){
    Q.append((rand()%rand())%100+1);
  }
  cout<<"After Data Added Ramndomly:"<<endl;
  print(Q);

  cout<<"After Assending Order:"<<endl;
  Q.sort();
  print(Q);
  cout<<"After Dessending Order:"<<endl;
  Q.sort(0);
  print(Q);

  cout<<"Let's POP some data:"<<endl;
  cout<<Q.pop()<<endl;
  cout<<Q.pop()<<endl;
  cout<<Q.pop()<<endl<<endl;
  cout<<"After Poped some data:"<<endl;
  print(Q);

  cout<<"After Pushed some data:"<<endl;
  Q.push(111);
  Q.push(555);
  Q.push(999);
  print(Q);

  Q.append(55);
  cout<<"AFTER APPENDED A DATA:"<<endl;
  print(Q);


  cout<<"MOVE CURRENT TO SECOND NODE (if exist) AND USE INSERTBEFORE TO ADD 1234:"<<endl;
  Q.goHead();
  Q.goNext();
  Q.insertBefore(1234);
  print(Q);

  cout<<"MOVE CURRENT TO FIFTH NODE (if exist) AND USE INSERTAFTER TO ADD 1000:"<<endl;
  Q.goHead();
  Q.goNext();
  Q.goNext();
  Q.goNext();
  Q.goNext();
  Q.insertAfter(1000);
  print(Q);

  cout<<"MOVE CURRENT TO SECOND NODE (if exist) AND REMOVE:"<<endl;
  Q.goHead();
  Q.goNext();
  Q.removeCurrent();
  print(Q);

  getchar();
  return 0;
}